A cohort of 446 763 individuals including 61 460 with acute myocardial infarction was acquired. Taking any dose of NSAIDs for one week, one month or more than a month was associated with an increased risk of myocardial infarction. With use for one to seven days, the probability of increased myocardial infarction risk (posterior probability of odds ratio >1.0) was 92% for celecoxib, 97% for ibuprofen, and 99% for diclofenac, naproxen, and rofecoxib. The corresponding odds ratios (95% credible intervals) were 1.24 (0.91 to 1.82) for celecoxib, 1.48 (1.00 to 2.26) for ibuprofen, 1.50 (1.06 to 2.04) for diclofenac, 1.53 (1.07 to 2.33) for naproxen, and 1.58 (1.07 to 2.17) for rofecoxib. Greater risk of myocardial infarction was documented for the higher dose of NSAIDs. With use for longer than one month, risks did not appear to exceed those associated with shorter durations.