To determine the cost-effectiveness of HMG-CoA (3-hydroxy-3-methylglutaryl coenzyme A) reductase inhibitors (such as lovastatin) for the primary and secondary prevention of coronary heart disease, we used the Coronary Heart Disease Policy Model, a computer-simulated model that estimates the risk factor-specific annual incidence of coronary heart disease and the risk of recurrent coronary events in persons with prevalent coronary heart disease. When used for secondary prevention, 20 mg/d of lovastatin was estimated to save lives and save costs in younger men with cholesterol levels above 250 mg/dL (6.47 mmol/L) and to have a favorable cost-effectiveness ratio regardless of the cholesterol level except in young women with cholesterol levels below 250 mg/dL (6.47 mmol/L). Doses of 40 mg/d of lovastatin had favorable incremental cost-effectiveness ratios in men with cholesterol levels above 250 mg/dL (6.47 mmol/L). By comparison, primary prevention had favorable cost-effectiveness ratios only in selected subgroups based on cholesterol levels and other established risk factors. We conclude that current national recommendations regarding medication for secondary prevention are not as aggressive as our projections would suggest, while recommendations regarding the use of medications for primary prevention should consider the cost of medication as well as the risk factor profile of the individual patient.