We develop a model of health investments and consumption over the life cycle where health a°Ëects longevity, provides áow utility, and health and consumption can be complements or substitutes. We solve each householdís dynamic optimization problem using data from the Health and Retirement Study from 1992 through 2008 and Social Security earnings histories. Our model matches well household out-of-pocket medical expenses, self-reported health status, and wealth. The model also does a nice job matching the evolution of health status in old age and changes in wealth between 1998 and 2008. We illustrate the importance ofendogenizing health investment by examining the e°Ëects on mortality and wealth of eliminating our stylized representation of Medicare. Medicare has meaningful effects on mortality, particularly at the bottom of the income distribution.