A gym membership can be HSA eligible, but only in narrow circumstances. The IRS is clear: gym dues paid to improve general health or fitness are not qualified medical expenses. However, if the membership is purchased for the sole purpose of treating a specific diagnosed medical condition, such as obesity, hypertension, or heart disease, it can qualify for reimbursement from your HSA.
The General Rule: Gym Memberships Are Not Eligible
IRS Publication 502 states plainly that “you can’t include membership dues in a gym, health club, or spa as medical expenses.” The IRS draws a firm line between expenses that treat a medical condition and expenses that are “merely beneficial to general health.” Working out because it’s good for you falls squarely on the ineligible side of that line, even if your doctor recommended it.
This applies broadly. Swimming lessons, dance classes, yoga, and other forms of exercise taken for general wellness are not qualified medical expenses, even with a doctor’s recommendation. The IRS addressed this directly in 2023, confirming that exercise “for the improvement of general health” does not count, period.
When a Gym Membership Does Qualify
The IRS carves out an exception when a gym membership serves a purely medical purpose. Specifically, the membership must be purchased “for the sole purpose of affecting a structure or function of the body (such as a prescribed plan for physical therapy to treat an injury) or the sole purpose of treating a specific disease diagnosed by a physician (such as obesity, hypertension, or heart disease).”
That word “sole” is doing a lot of work. If you have a diagnosed condition and also enjoy going to the gym for general fitness, the membership likely doesn’t qualify. The IRS expects the gym use to function as medical treatment, not a lifestyle choice that happens to have health benefits. Think of it more like a prescription than a perk.
Common conditions that could justify a gym membership as medical care include obesity, type 2 diabetes, high blood pressure, heart disease, and physical injuries requiring rehabilitation. But the diagnosis alone isn’t enough. You need documentation tying the gym membership directly to treatment of that condition.
Getting a Letter of Medical Necessity
To use HSA funds for a gym membership, you’ll need a Letter of Medical Necessity from a licensed healthcare provider. This letter should identify your specific medical condition, explain why exercise at a gym is medically necessary to treat it, and describe how the gym will be used as part of your treatment plan.
The letter needs to be more than a generic note saying “exercise would be beneficial.” It should connect your diagnosis to gym-based treatment in a way that makes clear this isn’t about general wellness. For example, a physician might prescribe a structured strength training program at a gym to manage a patient’s diagnosed hypertension, specifying the type of exercise, frequency, and treatment goals. Keep this letter on file. If the IRS or your HSA administrator questions the expense, you’ll need to produce it.
Beyond the letter, save your gym receipts and any records showing you followed the prescribed plan. Treat the documentation the same way you would for any other medical expense: detailed enough to survive scrutiny.
Exercise Equipment Follows the Same Rules
Home gym equipment, such as weights, treadmills, or resistance bands, follows the same framework. Equipment used for general health and wellbeing is not eligible. Equipment prescribed to treat a specific diagnosed condition can be reimbursed with a Letter of Medical Necessity.
The letter for equipment needs to be especially specific. It should outline your medical condition, explain why the equipment is necessary, describe how it will be used to address the condition, and confirm that the equipment serves a medical rather than general fitness purpose. A weight loss plan alone is not considered an acceptable reason for reimbursing exercise equipment.
What About Weight Loss Programs at a Gym?
There’s an interesting carve-out here. While gym membership dues are generally ineligible, the IRS does allow “separate fees charged there for weight loss activities.” So if your gym offers a distinct, separately billed weight loss program and you have a medical reason for participating (like a physician’s diagnosis of obesity), that specific fee could qualify even if the underlying membership does not.
This distinction matters if you’re trying to maximize what your HSA covers. A bundled gym membership that includes access to weight loss classes probably won’t qualify. A separate, itemized charge for a medically prescribed weight loss program at the same facility has a much stronger case.
Pending Legislation Could Change Things
A bill called the PHIT Act has been introduced multiple times in Congress, most recently as the PHIT Act of 2025. It would expand HSA and FSA eligibility to cover a broader range of physical activity expenses, potentially including gym memberships for general fitness. As of mid-2025, the bill has been referred to the House Committee on Ways and Means but has not been passed. Similar versions of this bill have stalled in previous congressional sessions, so there’s no guarantee it will become law.
If the PHIT Act does pass, it would represent a significant shift in how the IRS treats fitness expenses. Until then, the current rules apply: gym memberships are only HSA eligible when they serve as treatment for a specific diagnosed medical condition, backed by proper documentation from your healthcare provider.

