The increase in the elderly population is associated with increased health care costs. The objective of the present study was to describe the results of research conducted in groups of elderly persons from different socioeconomic classes in Porto Alegre in the state of Rio Grande do Sul, and to compare the drugs spending profiles of different groups. A cross-sectional study was performed using a sample of individuals aged 60 years or older who participated in community groups. Analysis of variance (ANOVA) and the Tukey test were used to analyze the difference in costs of drugs among different socioeconomic classes. A total of 225 seniors were interviewed and females were predominant in all classes. The most common chronic diseases included hypertension, which occurred in 21.0%, 36.0% and 38.0% of elderly persons in social classes A, C and E, respectively. The average number of medications was 5.34 (±2.64) in social class A, 4.07 (±2.73) in social class C and 4.28 (±2.39) in social class E. The share of household income spent on medication for elderly persons in classes A, C and E was 4.0%, 5.7% and 10.0%, respectively. The drugs with the highest monthly cost for each patient in class A, C and E, respectively, were antipsychotic and anti-Parkinson's medication, diabetes medicine, and medication for the treatment of bone disease. It was concluded that there are specific differences in the cost and expenses incurred on spending on medication for the elderly of different socioeconomic classes.