Though obesity is an established risk factor for gall bladder cancer, its role in cancers of the extrahepatic bile ducts and ampulla of Vater is less clear, as also is the role of abdominal obesity. In a population-based case-control study of biliary tract cancer in Shanghai, China, odds ratios (ORs) and 95% confidence intervals (CIs) were calculated for biliary tract cancer in relation to anthropometric measures, including body mass index (BMI) at various ages and waist-to-hip ratio (WHR), adjusting for age, sex, and education. The study included 627 patients with biliary tract cancer (368 gall bladder, 191 bile duct, 68 ampulla of Vater) and 959 healthy subjects randomly selected from the population. A higher BMI at all ages, including early adulthood (ages 20-29 years), and a greater WHR were associated with an increased risk of gall bladder cancer. A high usual adult BMI (>or=25) was associated with a 1.6-fold risk of gall bladder cancer (95% CI 1.2-2.1, P for trend <0.001). Among subjects without gallstones, BMI was also positively associated with gall bladder cancer risk. Regardless of BMI levels, increasing WHR was associated with an excess risk of gall bladder cancer risk, with those having a high BMI (>or=25) and a high WHR (>0.90) having the highest risk of gall bladder cancer (OR=12.6, 95% CI 4.8-33.2), relative to those with a low BMI and WHR. We found no clear risk patterns for cancers of the bile duct and ampulla of Vater. These results suggest that both overall and abdominal obesity, including obesity in early adulthood, are associated with an increased risk of gall bladder cancer. The increasing prevalence of obesity and cholesterol stones in Shanghai seems at least partly responsible for the rising incidence of gall bladder cancer in Shanghai.