OBJECTIVE: To study how income and educational level influence mortality after acute myocardial infarction (AMI). DESIGN AND SETTING: Prospective analysis using individual level linkage of registries in Denmark. PARTICIPANTS: All patients 30-74 years old hospitalised for the first time with AMI in Denmark in 1995-2002. MAIN OUTCOME MEASURES: Relative risk (RR) of 30 day mortality and long term mortality (31 days until 31 December 2003) associated with income (adjusted for education) or educational level (adjusted for income) and further adjusted for sex, age, civil status, and comorbidity. RESULTS: The study identified 21 391 patients 30-64 years old and 16 169 patients 65-74 years old. The 30 day mortality was 7.0% among patients 30-64 years old and 15.9% among those 65-74 years old. Among patients surviving the first 30 days, the long term mortality was 9.9% and 28.3%, respectively. The adjusted RR of 30 day mortality and long term mortality among younger patients with low compared with high income was 1.54 (95% confidence interval 1.36 to 1.79) and 1.65 (1.45 to 1.85), respectively. The RR of 30 day and long term mortality among younger patients with low compared with high education was 1.24 (1.03 to 1.50) and 1.33 (1.11 to 1.59), respectively. The RR of 30 day and long term mortality among older patients with low compared with high income was 1.27 (1.15 to 1.41) and 1.38 (1.27 to 1.50), respectively. Older high and low education patients did not differ in mortality. CONCLUSION: This study shows that both educational level and income substantially and independently affect mortality after AMI, indicating that each indicator has specific effects on mortality and that these indicators are not interchangeable.