Medical costs are measured using various methods, including cost-of-illness studies, which estimate the economic burden of a disease. These studies often use data from healthcare providers, insurance claims, and patient surveys. They may also take into account both direct and indirect costs to provide a comprehensive view of the financial impact of a disease.