Homelessness is believed to be a cause of health problems and high medical costs, but data supporting this association have been difficult to obtain. We compared lengths of stay and reasons for hospital admission among homeless and other low-income persons in New York City to estimate the hospitalization costs associated with homelessness. We obtained hospital-discharge data on 18,864 admissions of homeless adults to New York City's public general hospitals (excluding admissions for childbirth) and 383,986 nonmaternity admissions of other low-income adults to all general hospitals in New York City during 1992 and 1993. The differences in length of stay were adjusted for diagnosis-related group, principal diagnosis, selected coexisting illnesses, and demographic characteristics. Of the admissions of homeless people, 51.5 percent were for treatment of substance abuse or mental illness, as compared with 22.8 percent for the other low-income patients, and another 19.7 percent of the admissions of homeless people were for trauma, respiratory disorders, skin disorders, and infectious diseases (excluding the acquired immunodeficiency syndrome [AIDS]), many of which are potentially preventable medical conditions. For the homeless, 80.6 percent of the admissions involved either a principal or a secondary diagnosis of substance abuse or mental illness -- roughly twice the rates for the other patients. The homeless patients stayed 4.1 days, or 36 percent, longer per admission on average than the other patients, even after adjustments were made for differences in the rates of substance abuse and mental illness and other clinical and demographic characteristics. The costs of the additional days per discharge averaged $4,094 for psychiatric patients, $3,370 for patients with AIDS, and $2,414 for all types of patients. Homelessness is associated with substantial excess costs per hospital stay in New York City. Decisions to fund housing and supportive services for the homeless should take into account the potential of these services to reduce the high costs of hospitalization in this population.