The IRS medical necessity standard for HSA and FSA spending, and for itemized medical deductions, comes from Internal Revenue Code Section 213(d): an expense qualifies only when its primary purpose is to diagnose, treat, prevent, or mitigate a specific disease, or to affect a structure or function of the body tied to an identifiable health condition.1Office of the Law Revision Counsel. 26 USC 213 – Medical, Dental, Etc., Expenses Spending that mainly promotes general well-being fails the test even when a doctor thinks it’s a good idea. That single distinction decides whether your HSA reimbursement, FSA claim, or Schedule A deduction stands up.
The Two-Part Statutory Test
Section 213(d) defines medical care as amounts paid for the diagnosis, cure, mitigation, treatment, or prevention of disease, or for the purpose of affecting any structure or function of the body. The second half is broader than most people assume. Dental work, vision correction, hearing aids, and orthodontics all qualify under “structure or function” even when no disease is involved, because they address a measurable physical limitation.
The controlling word in IRS guidance is “primarily.” Publication 502 states that medical care expenses must primarily alleviate or prevent a physical or mental disability or illness.2Internal Revenue Service. Publication 502 – Medical and Dental Expenses If the main reason you spent the money was anything else, incidental health benefits don’t rescue the expense. That standard is what plan administrators apply to reimbursement requests and what the IRS applies on audit.
Three elements generally have to line up for something to clear the bar: a specific diagnosed condition or identifiable health risk, a treatment or item that directly addresses it, and a purpose that is medical rather than personal. Straightforward medical care such as a doctor’s visit, a prescription, or a physical therapy session meets all three without discussion. Everything else lives in the gray zone the rest of this article walks through.
Expenses That Fail the Standard
Two categories account for most denied claims.
Cosmetic surgery is specifically excluded from the definition of medical care. Any procedure aimed at improving appearance that doesn’t meaningfully promote proper body function or treat illness or disease is non-deductible and can’t be reimbursed from an HSA or FSA.1Office of the Law Revision Counsel. 26 USC 213 – Medical, Dental, Etc., Expenses Face lifts, hair transplants, electrolysis, and liposuction are the classic examples. Three exceptions bring cosmetic procedures back inside the definition: corrections to a deformity caused by a congenital abnormality, an accident or trauma, or a disfiguring disease.2Internal Revenue Service. Publication 502 – Medical and Dental Expenses Breast reconstruction after cancer surgery fits that standard because the deformity resulted directly from the disease and its treatment.
General-health spending is the other big exclusion. Vitamins, nutritional supplements, herbal remedies, and similar products taken to maintain ordinary good health don’t qualify, even after a casual doctor recommendation. The narrow exception is a supplement recommended by a medical practitioner as treatment for a specific condition diagnosed by a physician.3Internal Revenue Service. Frequently Asked Questions About Medical Expenses Related to Nutrition, Wellness and General Health A vacation your doctor suggests for stress relief doesn’t qualify either, because the expense lacks a direct connection to a diagnosed medical condition.2Internal Revenue Service. Publication 502 – Medical and Dental Expenses
One area worth flagging because the rule changed: over-the-counter medicines. Since the CARES Act took effect in 2020, OTC drugs and menstrual care products have been qualified expenses for HSA and FSA reimbursement without a prescription. That change didn’t alter the 213(d) standard itself; it removed the prescription hurdle for tax-advantaged accounts.
Dual-Purpose Expenses and the “But For” Test
Most disputes involve items that serve both a medical purpose and an ordinary personal one. The IRS resolves these with a single question: would you have incurred this expense but for the medical condition? If the answer is no, the cost qualifies.2Internal Revenue Service. Publication 502 – Medical and Dental Expenses
Weight-loss programs are the textbook illustration. A gym membership or diet plan to look better for summer doesn’t qualify. The same program prescribed by a physician to treat a diagnosed condition such as obesity, hypertension, or heart disease does qualify, though only the portion directly tied to the medical treatment. If you’d never have enrolled without the diagnosis, the “but for” test is satisfied.
Massage therapy works the same way. A massage because your shoulders are tight after a long week is personal spending. A massage prescribed by a physician to treat a diagnosed injury, chronic pain condition, or mental health disorder can qualify with documentation connecting the treatment to the specific condition. The IRS scrutinizes dual-purpose expenses more heavily than straightforward medical costs, and sloppy recordkeeping is where most claims fall apart.
Service Animals
Costs for a service animal trained to assist with a physical or mental disability qualify, including purchase price, training, food, grooming, and veterinary care.4Internal Revenue Service. Fact Sheet for FS 2015 Service Animals for Taxpayers with Disabilities The animal has to be trained to perform specific tasks related to your disability, but it does not need any state or local certification or license. An emotional support animal without task-specific training doesn’t meet this standard.
The Letter of Medical Necessity
For any expense that isn’t obviously medical, a Letter of Medical Necessity from your healthcare provider is the document that proves you’ve cleared the standard. HSA and FSA administrators routinely require one before reimbursing dual-purpose items, and having one on file strengthens any expense you claim on your tax return.
An effective letter should include:
- Your specific diagnosis by name, not a vague reference to discomfort or general health
- The recommended treatment or item and why alternatives are insufficient
- The clinical connection between the expense and your symptoms or functional limitations
- Expected duration, meaning whether this is a one-time purchase or an ongoing need
The letter should be on the provider’s letterhead, signed, and dated. Vague language is what kills these letters. “Patient would benefit from a standing desk” is weak. “Patient has been diagnosed with degenerative disc disease (ICD-10 M51.16) and requires an adjustable standing workstation to reduce spinal compression during work hours” gives the administrator and the IRS something concrete to approve.
For IRS purposes, the condition itself must be diagnosed by a physician, though the treatment can be delivered by other licensed practitioners such as dentists, chiropractors, or physical therapists.3Internal Revenue Service. Frequently Asked Questions About Medical Expenses Related to Nutrition, Wellness and General Health Get the letter before making the purchase whenever possible. Retroactive documentation months later invites delays and skepticism from plan administrators.
Preventive Care and Diagnostic Tests
You don’t have to be sick to have a qualified medical expense. Annual physicals, routine bloodwork, and diagnostic tests ordered by a doctor all count, even when results come back normal.2Internal Revenue Service. Publication 502 – Medical and Dental Expenses The IRS explicitly includes the cost of electronic body scans. Cancer screenings, cholesterol panels, and other preventive tests fit squarely within the statutory language about preventing disease.
The line runs between physician-directed diagnostics and self-prescribed wellness tracking. A full-body CT scan your doctor orders to investigate symptoms is a medical expense. A consumer genetic test you buy because you’re curious about your ancestry falls on the other side unless a physician prescribed it to evaluate a specific health risk.
Home Modifications
Permanent improvements to your home that accommodate a medical condition or disability can be treated as medical expenses, but the deductible amount depends on whether the improvement adds value to the property.2Internal Revenue Service. Publication 502 – Medical and Dental Expenses If you spend $10,000 and an appraiser determines the work increased your home’s market value by $3,000, you can treat $7,000 as a medical expense. Only the amount exceeding the value increase counts.
Certain modifications made to accommodate a disability are generally presumed to add no value to the home, so the full cost qualifies. These include:
- Entrance and exit ramps
- Widened doorways for wheelchair access
- Lowered kitchen cabinets and modified counters
- Porch lifts and stairway lifts (elevators generally do add value)
- Modified electrical outlets, door handles, fire alarms, and stairways
- Handrails and grab bars
- Lead-based paint removal to protect a child who has or had lead poisoning
The improvement has to be for the medical care of you, your spouse, or a dependent who lives in the home. A renovation that happens to be convenient but isn’t driven by a medical condition doesn’t qualify.
Ongoing operating costs for a medically necessary improvement also qualify, even when the original installation cost was only partly deductible. Electricity for a stair lift, repairs to a wheelchair ramp, and extra utility costs from a larger apartment needed to house a medical attendant are all includable so long as the primary purpose remains medical care.2Internal Revenue Service. Publication 502 – Medical and Dental Expenses
For any modification where property value is at issue, a professional appraisal showing before-and-after value is necessary. The appraisal fee itself isn’t a deductible medical expense, but without one you can’t calculate the deduction.
Travel and Lodging for Care
When you travel for medical care that isn’t available near home, both transportation and lodging can qualify. For 2026, the standard mileage rate for medical travel is 20.5 cents per mile.5Internal Revenue Service. IRS Sets 2026 Business Standard Mileage Rate at 72.5 Cents per Mile, Up 2.5 Cents You can use that rate or track actual out-of-pocket costs like gas and parking, but not general wear and tear beyond the mileage rate.
Lodging near a hospital or medical facility is deductible at up to $50 per night per person. If someone needs to travel with the patient, such as a parent accompanying a child, the combined limit is $100 per night.2Internal Revenue Service. Publication 502 – Medical and Dental Expenses The lodging can’t be lavish, and there can’t be any significant element of personal vacation in the trip. Meals during medical travel are not included.
What Happens If You Get It Wrong
The consequences of claiming a non-qualified expense depend on which account paid for it.
HSA withdrawals for anything other than a qualified medical expense are added to your taxable income and hit with an additional 20% tax.6Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts On a $1,000 non-qualified withdrawal in the 22% bracket, that’s $220 in income tax plus $200 in penalty. The 20% additional tax goes away after age 65, upon disability, or at death. After 65, non-qualified withdrawals are still taxed as ordinary income, but the penalty disappears.7Internal Revenue Service. IRS Publication 969 – Health Savings Accounts and Other Tax-Favored Health Plans
FSA rules work differently. Because FSA funds are salary reductions held by your employer’s plan, there’s no withdrawal penalty in the same sense. If your FSA reimburses a purchase that turns out not to be a qualified expense, the employer is required to recover the funds. Plan administrators typically deactivate the FSA debit card until the amount is resolved, demand repayment, and if that fails, offset the amount against future qualified claims or withhold it from your paycheck.
For itemized deductions, an unsupported claim on Schedule A can be disallowed on audit, producing back taxes, interest, and potentially accuracy-related penalties. Keep receipts, letters of medical necessity, explanation-of-benefits statements, and any other supporting documentation for at least three years after filing.8Internal Revenue Service. How Long Should I Keep Records If you underreport income by more than 25%, the audit window extends to six years, so hold records longer when your tax situation is complicated.
The through-line across all three consequences is the same: the necessity standard doesn’t get resolved when you swipe the card or file the return. It gets resolved when someone asks for the diagnosis, the prescription, or the letter. Building that file at the time of the expense is what turns a defensible position into a settled one.