Selective cyclooxygenase-2 (Cox-2) inhibitors, developed to reduce the risk of NSAID-related gastrointestinal (GI) complications, have been associated with an increased risk of cardiovascular events. Our objective was to determine the balance of potential harm and benefit related to Cox-2 inhibitors' exposure. The study population included patients aged 40+ years who received a prescription for Cox-2 inhibitors and were included in the General Practice Research Database. The incidence of upper GI events, myocardial infarction (MI) and stroke was estimated in this cohort. It was assumed that patients had experienced the upper GI and cardiovascular effects, as observed in clinical trials [relative rate (RR) of 0.49 for upper GI and 1.86 for MI]. Simulation methodology was used to estimate attributable risks, i.e. the difference between exposed and unexposed event probabilities. The study population included 155,439 Cox-2 users. The number of upper GI events prevented by Cox-2 inhibitors was 179, while the number of excess MI cases was 83 per 10,000 patients treated for 4 years. A strong association was found between extent of GI benefit and cardiovascular harm. There was a large difference in the frequency of benefit over harm in only 6% of the patients (difference of 1% or more); 23% of the patients had more harm than benefit, including those with a history of ischaemic heart disease. The benefit of Cox-2 inhibitors in reducing the frequency of upper GI events may be offset by their cardiovascular harm, particularly in patients with risk factors for cardiovascular disease.