IRS Section 213(d) Rules: Qualified Medical Expenses

Qualified medical expenses under Section 213(d) are amounts paid to diagnose, treat, cure, mitigate, or prevent disease, or to affect any structure or function of the body, plus transportation essential to that care, qualified long-term care services, and premiums for insurance covering medical care.1Office of the Law Revision Counsel. 26 USC 213 – Medical, Dental, Etc., Expenses You can deduct these costs on Schedule A, but only the portion that exceeds 7.5% of your adjusted gross income, and only to the extent you paid them out of pocket with after-tax money.2Internal Revenue Service. Topic No. 502, Medical and Dental Expenses

The category is broader than most people expect. It reaches beyond doctor bills into things like fertility treatment, home accessibility modifications, service animals, and travel for care. It also has firm edges: cosmetic procedures, gym memberships, and general wellness spending fall outside it.

The Rule That Decides Everything: Primary Purpose

Section 213(d) doesn’t list every qualifying expense. Instead it applies a test: the amount must be paid primarily for medical care. An expense that only incidentally benefits your health fails. An expense whose main reason for existing is to treat or prevent a specific condition passes.

That’s why a gym membership doesn’t qualify even for someone with heart disease: its primary purpose is general fitness. A weight-loss program prescribed to treat diagnosed obesity, hypertension, or diabetes does qualify, because the primary purpose is treating a named condition.3Internal Revenue Service. Publication 502 (2025), Medical and Dental Expenses The same logic runs through nearly every close call in this area.

The statute’s phrase about affecting “any structure or function of the body” extends coverage to things that aren’t disease treatment in the ordinary sense. Orthodontia qualifies. So does surgery to reverse a prior sterilization. So do fertility treatments generally, including in vitro fertilization and temporary storage of eggs or sperm, whether the procedure is on you, your spouse, or a dependent. Surrogacy expenses do not qualify.3Internal Revenue Service. Publication 502 (2025), Medical and Dental Expenses

What Clearly Qualifies

Payments to licensed medical practitioners for treatment are the core of the deduction: doctors, surgeons, dentists, psychiatrists, psychologists, chiropractors, and similar professionals. Office visits, procedures, and diagnostic tests all count. Inpatient hospital care is fully deductible, including meals and lodging provided by the facility, when the principal reason for the stay is medical.3Internal Revenue Service. Publication 502 (2025), Medical and Dental Expenses

Prescription drugs and insulin qualify. Over-the-counter medications generally do not, with a narrow exception for OTC items a medical practitioner recommends to treat a specific diagnosed condition. Routine vitamins and supplements for general health are out.

Dental work covers cleanings, fillings, extractions, and orthodontia. Vision care covers exams, prescription eyeglasses, contact lenses, and corrective procedures such as LASIK. Hearing aids qualify, along with the batteries, repairs, and maintenance needed to run them. Artificial limbs and other prosthetic devices are deductible.

Mental health care is treated the same as physical health care. Psychiatric treatment, psychoanalysis, and payments to a psychologist all qualify, as do the costs of supporting a mentally ill dependent at a specialized medical center.

Special education tuition can qualify when a child attends the school primarily to overcome a learning disability caused by a mental or physical impairment. Ordinary education must be incidental to the specialized instruction. Teaching Braille, lip reading, or remedial language training to correct a condition caused by a birth defect fits this rule, and tutoring by a specially trained teacher qualifies when a doctor recommends it. A school attended primarily for behavioral or disciplinary reasons does not qualify even if the child benefits.3Internal Revenue Service. Publication 502 (2025), Medical and Dental Expenses

Buying, training, and maintaining a service animal for a person who is visually impaired, hearing disabled, or has another physical disability qualifies, including food, grooming, and veterinary care that keep the animal working.

Insurance Premiums and Long-Term Care

Premiums for insurance covering medical care are deductible, including policies for hospitalization, surgery, prescription drugs, and dental coverage. Medicare Part B and Part D premiums qualify, and so do premiums for voluntary Medicare Part A enrollment for people not otherwise covered through Social Security.3Internal Revenue Service. Publication 502 (2025), Medical and Dental Expenses

Two limits matter. First, only premiums paid with after-tax dollars count. Amounts your employer pays, or that you pay through a pre-tax cafeteria plan, are already excluded from your income and cannot be deducted again. Second, when a policy bundles medical and non-medical benefits, only the medical portion counts, and the allocation has to be separately stated in the contract or in a statement from the insurer.

Qualified long-term care services are included in the definition of medical care, and premiums for qualified long-term care insurance are deductible up to age-based annual caps. For 2025 those caps run from $480 for people age 40 or younger to $6,020 for those over 70.4Internal Revenue Service. Eligible Long-Term Care Premium Limits Anything above the cap for your age bracket does not qualify. The IRS adjusts these limits annually.

Nursing home costs use the primary-purpose test in a way that has big financial consequences. If the person is in the facility principally for medical care, the entire cost, meals and lodging included, is a medical expense. If the principal reason is help with daily activities that doesn’t rise to the level of medical care, only the portion tied to actual medical treatment qualifies.5Internal Revenue Service. Medical, Nursing Home, Special Care Expenses Facility documentation of the resident’s condition and care needs drives that determination.

Travel, Lodging, and Mileage

Transportation whose primary purpose is getting medical care is deductible.1Office of the Law Revision Counsel. 26 USC 213 – Medical, Dental, Etc., Expenses You can deduct actual out-of-pocket costs like gas, parking, tolls, bus fare, and ambulance charges, or use the IRS standard medical mileage rate. For 2026 that rate is 20.5 cents per mile.6Internal Revenue Service. 2026 Standard Mileage Rates If you use the mileage rate, you can still add parking fees and tolls.

Lodging while traveling for care has its own rule. When a physician provides the care at a licensed hospital or an equivalent facility, you can deduct up to $50 per night for lodging. A companion who needs to travel with you gets the same $50, for up to $100 per night combined. The lodging cannot be lavish or extravagant, and the trip cannot have a significant element of personal recreation. Meals during travel are not deductible unless they’re part of inpatient care.3Internal Revenue Service. Publication 502 (2025), Medical and Dental Expenses

Home Modifications for Medical Care

Capital improvements made primarily for medical reasons can qualify, but the deductible amount is the cost minus any increase in the home’s fair market value. Spend $20,000 on an elevator that raises the home’s value by $12,000, and $8,000 is your medical expense. You generally need an appraisal to establish the before-and-after values.3Internal Revenue Service. Publication 502 (2025), Medical and Dental Expenses

Certain accessibility modifications are treated as adding no value, so their full cost is deductible. Entrance and exit ramps, widened doorways, handrails and grab bars, and modified electrical outlets and fixtures fall into this group. Publication 502 has a longer list; the common thread is that the modification accommodates a disability rather than improves the home for general use.

What Doesn’t Qualify

Cosmetic surgery is excluded unless it corrects a deformity arising from a congenital abnormality, an accident, or a disfiguring disease.1Office of the Law Revision Counsel. 26 USC 213 – Medical, Dental, Etc., Expenses Reconstructive surgery after an accident qualifies; a facelift for aesthetic reasons doesn’t.

Other common exclusions: health club dues, non-prescription drugs other than insulin, vitamins and supplements taken for general wellness, and toiletries. Over-the-counter nicotine gum and patches that don’t require a prescription are out, though a formal smoking cessation program does qualify (the IRS recognizes tobacco use disorder as a disease) and prescription drugs for nicotine withdrawal are deductible.7Internal Revenue Service. Frequently Asked Questions About Medical Expenses Related to Nutrition, Wellness and General Health

Expenses paid or reimbursed tax-free through a health savings account, flexible spending arrangement, or health reimbursement arrangement cannot also be deducted on Schedule A.8Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans The deduction is for unreimbursed, out-of-pocket costs only. Anything covered by insurance is also outside the deduction.

One structural point worth flagging: you only get any of this by itemizing on Schedule A. If your total itemized deductions across all categories don’t exceed the standard deduction for your filing status, the medical deduction produces no benefit even when your expenses clear the 7.5% floor.9Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026

Keeping Records

The IRS expects documentation for every expense you deduct, even though you don’t file it with your return. Keep receipts, explanation-of-benefits statements from your insurer, pharmacy printouts, and a mileage log for medical trips. Capital home improvements need records of both the cost and the property’s before-and-after value. Because the 7.5% floor means you often won’t know until year-end whether the deduction pays off, a running log through the year is easier than reconstructing months of expenses at filing time.3Internal Revenue Service. Publication 502 (2025), Medical and Dental Expenses