Blog
Which medical costs count for the tax deduction, and which are gray areas?
Twelve questions on what counts toward the medical deduction, from premiums and mileage to gym dues and home ramps, with IRS Publication 502 as the check.
The federal medical expense deduction covers costs paid for the diagnosis, treatment, mitigation or prevention of disease, and for treatments affecting a structure or function of the body, but only the part of your total that exceeds 7.5% of your adjusted gross income, and only if you itemize. The hard questions are not about the floor. They are about the edges: is a gym membership medical, is a ramp for a wheelchair, is a weight-loss program. The IRS answers these in Publication 502, "Medical and Dental Expenses," and the answers often turn on a detail such as whether a doctor prescribed the item for a specific condition.
This post works through twelve questions people actually ask. Every example is an illustration with invented numbers, and nothing here is tax advice. Publication 502 for the year you are filing is the document to check before you claim anything, and a tax professional can apply it to your return. The overview in How to deduct medical expenses on your taxes: the AGI floor explains how the floor works, and medical expense deduction defines the term.
Insurance premiums
Which health insurance premiums count?
Premiums for medical, dental and vision coverage count if you paid them with after-tax money. That includes premiums for an individual or family plan you bought yourself, for coverage you paid for through COBRA, and for a Medigap or Medicare Advantage plan.
Three exceptions matter:
- Premiums taken from your paycheck before tax do not count. If your employer runs a cafeteria plan (Section 125), the amount was never taxed, so it cannot also be deducted. Your W-2 and pay stub show whether deductions were pretax.
- The part of a marketplace premium paid by the premium tax credit does not count. Only what you paid yourself does.
- Premiums you already deducted elsewhere do not count twice. A self-employed person who takes the self-employed health insurance deduction on Form 7206 cannot also include those premiums here. The guide self-employed health insurance deduction explained covers that deduction, which is not subject to the 7.5% floor.
If your employer pays part of the premium, only your share counts, and only if it is after-tax.
Do Medicare premiums count?
Generally yes, for the premiums you pay. Part B premiums, Part D premiums, Medicare Advantage premiums and Medigap premiums count if you paid them yourself. Part A counts if you pay a premium for it, which most people do not. Many people have the Part B premium taken from a Social Security check; the amount was still paid by you, so it counts, and the annual statement from Social Security shows how much was withheld. For this year's amounts, see medicare premiums and deductibles: what you pay in 2026 and 2027. The IRMAA surcharge on high earners is part of the premium and counts the same way.
An illustration: say a retired couple pays $3,000 in Part B premiums, $1,200 in Medigap premiums and $800 in Part D premiums over a year, all after tax. Their premium subtotal is $5,000 before any other medical cost. Add prescription copays and dental work, and the total can approach the floor even though no one was hospitalized.
What about long-term care premiums and age limits?
Premiums for a "qualified" long-term care insurance contract can count, but only up to an annual amount that rises with your age at the end of the year. The IRS publishes the limits for each tax year in a revenue procedure and in Publication 502, and each person on the policy has a separate limit. A younger buyer's limit is a small fraction of an older buyer's, and the premium above the limit is not deductible as a medical expense.
Two details that people miss. First, the contract must be a qualified one, which your insurer or the policy summary can confirm. Second, the long-term care premium counts as an itemized medical expense only if you itemize; a self-employed person may instead deduct it with other health premiums, subject to the same age-based limit. Look up the figure for the tax year on the IRS site rather than relying on a number from an article. The broader topic is in long-term care insurance explained: how it works and what it costs.
Travel to treatment
Can I deduct mileage and lodging for treatment?
Yes, in many cases, for travel whose main purpose is getting medical care. You can use either your actual car costs (gas and oil, not general upkeep) or the IRS's medical mileage rate, plus parking and tolls. The medical rate is set annually and is lower than the business rate, so look it up for the tax year. Bus, train, taxi and ambulance fares count. Mileage to a pharmacy or doctor's office counts too.
Lodging is the gray part. Lodging away from home for medical care can count, but only within a per-night limit per person that Publication 502 states, and only if the stay is primarily for and essential to the treatment, with no significant element of personal pleasure or recreation. A hotel near a hospital during a child's weeks of treatment is the standard example. A weekend trip that happens to include an appointment is not. Meals during travel generally do not count, except for meals that are part of inpatient care.
Keep a log: date, destination, purpose and miles. Without records the deduction can disappear on review.
Procedures and programs
Do cosmetic procedures count?
Generally no. Cosmetic surgery and similar procedures that only improve appearance are excluded, and so is teeth whitening. There is an exception for procedures needed to correct a deformity arising from a congenital abnormality, an injury from an accident or trauma, or a disfiguring disease. Reconstructive surgery after an injury or breast reconstruction after a mastectomy are examples; Publication 502 gives the rule.
The test is why the procedure was done, not what it is called. The same operation can be cosmetic for one patient and reconstructive for another. If a doctor's letter documents the medical reason, keep it with your records. If you are unsure, a tax professional should decide before you claim it.
Does a weight-loss program or a gym membership count?
Sometimes, but only when it treats a specific disease diagnosed by a physician. A weight-loss program prescribed for obesity, hypertension or another diagnosed condition can count, as can program fees at a weight-loss clinic. A program you join for general health, to improve appearance or to feel better does not. Food purchased for a diet does not count even in a qualifying program, though the program fees can.
Gym dues are the harder case. Membership fees for general fitness are not deductible. A membership can qualify only if it is part of treatment for a particular condition and a doctor prescribes it, and the IRS looks for documentation linking the two. The claim is hard to support, and a tax professional can say whether a given prescription is enough.
Equipment, home and family-building
Are hearing aids, glasses and dental work deductible?
Yes. Hearing aids and their batteries, glasses and contact lenses, dentures, and dental treatment (fillings, extractions, braces, implants) are qualifying medical costs. Preventive dental cleanings count too. Over-the-counter sunglasses and cosmetic dental work like whitening do not.
These categories matter because they are often large and elective in timing, which is why they show up in the strategy post Can I bunch medical bills into one year to get a tax deduction?. Insurance that reimburses part of the cost reduces the deductible amount by the reimbursement.
Can home modifications count?
Some can. Changes to a home that are made mainly for medical care, such as entrance ramps, widened doorways, grab bars, stair lifts or a modified bathroom for someone with a disability, can count as medical expenses. The wrinkle is that if the change increases the value of your home, only the amount of the cost that exceeds the increase in value counts. Many access modifications add little or no value, so most of the cost qualifies; a full remodel or a pool added for therapy may add value and is more limited. If a modification will be large, an appraisal before and after helps document the difference.
Ordinary improvements and general upkeep never count. The modification has to be about a medical need, and ideally a doctor's note says so. Your tax professional should see the paperwork before you claim a figure, and Publication 502 covers capital expenses in a dedicated section.
What about fertility treatment?
Fertility treatments, including some procedures for people who need help conceiving, can qualify as medical care for the person who needs them. Costs for related services such as lab tests and medications are included. Costs that fall outside what Publication 502 allows, such as some surrogacy and adoption-related expenses, are less clear, and adoption has its own tax credit with different rules. The tax treatment depends on who has the medical condition and what the service is, and a tax professional is the right person for anything involving a third party. Insurance reimbursements, including any from a plan that covers part of fertility care, reduce the deductible amount.
Reimbursements, family members and records
What if my insurer, HSA or FSA already paid?
An amount that was reimbursed does not count. If your plan paid part of a bill, only what you paid counts. If you paid a bill from an HSA or a health FSA, you used untaxed money, and that payment is excluded from the itemized deduction. Using the account's money for a cost and then also deducting it would claim the tax benefit twice.
A later reimbursement can also matter. If you deducted a cost in one year and an insurer reimbursed it in the next, part of the reimbursement may be reportable income. If a dispute with an insurer is pending, the safer practice is to wait to claim the disputed amount. Keep the explanation of benefits with the receipt; the EOB documents what you owed.
Whose costs count: spouse, children, other relatives?
Costs you pay for yourself, your spouse and your dependents generally count. For a dependent, the person generally must have been a dependent either when the service was provided or when you paid for it, and a few details of the dependency test are relaxed for medical purposes. Costs of an adult relative you support, such as a parent, can count if the dependency conditions are met, with income and support tests that Publication 502 explains.
Divorced or separated parents have a special rule for a child: the parent who actually paid the medical costs can generally claim them, regardless of who claims the child as a dependent. Medical costs you pay for someone who is not your dependent, such as a friend or an adult sibling, generally do not count. A tax professional can apply the tests to a complicated household.
What counts for prescriptions and over-the-counter items?
Prescription drugs and insulin count. Over-the-counter medicines generally do not count unless a prescription is involved, though insulin is an exception even without a prescription. Medical supplies such as bandages, crutches, a blood pressure monitor and a glucose meter can count. Vitamins and supplements taken for general health do not.
Prescription costs you paid with a copay card or discount program count only to the extent you paid them, and a drug paid for out of an HSA is excluded.
How should I confirm and keep records?
Start with Publication 502 for the tax year you file, read the section on the specific item, and use the IRS website's guidance for the current year. Keep:
- receipts and explanations of benefits for each cost;
- proof of payment (a statement, a canceled check, a card statement);
- a mileage log if you claim travel;
- a doctor's letter for any gray-area item, written before the claim;
- a list of reimbursements from insurance, an HSA or an FSA.
Then enter the total in the medical expense deduction calculator to see whether it clears the floor. A tax professional should review anything that is both large and uncertain, because the floor means a mistake on a gray-area item can wipe out the whole deduction or the claim. The IRS's own help resources can answer general questions, but they will not tell you what you should claim.
A quick sorting table
The table below is a sorting aid, not a ruling. The left column is usually yes, the right column is usually no, and the middle column needs documentation or a professional.
| Usually counts | Depends | Usually does not count |
|---|---|---|
| After-tax insurance premiums | Lodging near treatment | Pretax payroll premiums |
| Medicare Part B, Part D, Medigap premiums | Weight-loss programs for a diagnosed condition | General gym dues |
| Hearing aids, glasses, dentures | Home modifications | Cosmetic procedures |
| Doctor, hospital and dental bills | Long-term care premiums (age limit) | Vitamins for general health |
| Mileage to treatment | Fertility-related costs | Costs paid by an HSA or insurer |
Key takeaways
- Only the amount above 7.5% of AGI is deductible, and only if you itemize, so a gray-area item matters mostly when your total is near the floor.
- After-tax premiums, Medicare premiums, hearing aids, dental work and travel to treatment generally count, but pretax payroll premiums and anything reimbursed or paid from an HSA or FSA do not.
- Weight-loss programs, gym dues, lodging and home modifications depend on a diagnosed condition, a doctor's documentation and the specific facts, so keep letters and records.
- Publication 502 for the tax year is the place to confirm any figure or rule, and a tax professional should decide anything large and uncertain.