OBJECTIVE: To evaluate doctors' coffee consumption at work and differences between specialties. DESIGN: Single centre retrospective cohort study. SETTING: Large teaching hospital in Switzerland. PARTICIPANTS: 766 qualified doctors (425 men, 341 women) from all medical specialties (201 internal medicine, 76 general surgery, 67 anaesthetics, 54 radiology, 48 orthopaedics, 43 gynaecology, 36 neurology, 23 neurosurgery, 96 other specialties). DATA SOURCE: Staff purchasing history from staff canteens' electronic payment system linked to separate anonymised personal data from the human resource database. MAIN OUTCOME MEASURE: Numbers of coffees purchased per person per year. RESULTS: 84% (644) of doctors purchased coffee at one of the hospital canteens. 70 772 coffees were consumed by doctors in 2014. There was a significant association between specialty and yearly coffee purchasing (F=12.45; P<0.01). On average orthopaedic surgeons purchased the most coffee per person per year (mean 189, SD 136) followed by radiologists (177, SD 191) and general surgeons (167, SD 138). Anaesthetists purchased the least coffee (39, SD 48). Male doctors bought significantly more coffees per person per year (128 (SD 140) v 86 (SD 86), t=-4.66, P<0.01) and twice as many espressos as female doctors (mean 27 (SD 46) v 10 (SD 19), t=-6.54, P<0.01). Hierarchical position was associated with coffee purchasing (F=4.55; P=0.04). Senior consultants (>5 years' experience) bought most coffees per person per year (140, SD 169) and junior doctors and registrars bought fewest (95, SD 85). Propensity of buying rounds also increased with hierarchical position (?(2)=556.24; P<0.01), with heads of departments buying more rounds than junior doctors (30% v 15%). CONCLUSIONS: Doctors commonly use coffee as a stimulant. Substantial variation exists between specialties. Surgeons drink notably more coffee than physicians, with orthopaedic surgeons consuming the greatest amount in the communal cafeteria setting, though this might reflect social tendencies rather than caffeine dependency. Hierarchical position is positively correlated with coffee consumption and generosity with regard to buying rounds of coffee.