Updated November 5, 2026. Quick answer: Worksheet D in Publication 502 gives the adjusted basis of medical equipment or property you deducted in one year and sold in a later year. The basis is the part of the cost you could not deduct because of the AGI limit on medical expenses; line 5 or line 12 then feeds Worksheet E.
What Worksheet D is for
The publication says “If you deduct the cost of medical equipment or property in one year and sell it in a later year, you may have a taxable gain.” “The adjusted basis is the portion of the cost of the equipment or property that you couldn’t deduct because of the 7.5% or 10% AGI limit used to figure your medical deduction.” “Refer to your Schedule A (Form 1040) for the year the cost was included to determine which limit applied to you.” The instructions on the sheet: “Use this worksheet if you deducted the cost of medical equipment or property in one year and sold the equipment or property in a later year.” It is marked “Keep for Your Records”.
Lines 1 to 5
| Line | What it asks |
|---|---|
| 1 | “Enter the cost of the equipment or property” |
| 2 | “Enter your total includible medical expenses for the year you included the cost in your medical expenses” |
| 3 | “Divide line 1 by line 2” |
| 4 | “Enter 7.5% or 10% of your AGI (whichever applies) for the year the cost was included in your medical expenses” |
| 5 | “Multiply line 3 by line 4.” “If your allowable itemized deductions for the year you purchased the equipment or property weren’t more than your AGI for that year, stop here. This is the adjusted basis of the equipment or property.” |
Lines 6 to 12: when itemized deductions exceeded AGI
Line 5 says “If your allowable itemized deductions for the year you purchased the equipment or property were more than your AGI for that year, complete lines 6 through 11”.
| Line | What it asks |
|---|---|
| 6 | “Subtract line 5 from line 1” |
| 7 | “Enter your total allowable itemized deductions for the year the cost was included in your medical expenses” |
| 8 | “Divide line 6 by line 7” |
| 9 | “Enter your AGI for the year the cost was included in your medical expenses” |
| 10 | “Subtract line 9 from line 7” |
| 11 | “Multiply line 8 by line 10” |
| 12 | “Add line 5 to line 11.” “If your allowable itemized deductions for the year you purchased the equipment or property were more than your AGI for that year, this is the adjusted basis of the equipment or property” |
Two worked examples (invented numbers)
Case 1 (computed): equipment costing $2,000 was deducted in a year when includible medical expenses were $10,000, AGI was $80,000 and the 7.5% limit applied. Itemized deductions were $60,000, not more than AGI.
| Line | Entry | Value |
|---|---|---|
| 1 | Cost of the equipment (invented) | $2,000 |
| 2 | Includible medical expenses for that year (invented) | $10,000 |
| 3 | Line 1 divided by line 2 (computed) | 0.2 |
| 4 | 7.5% of AGI of $80,000 (computed) | $6,000 |
| 5 | Line 3 times line 4 (computed); itemized deductions were not more than AGI, so stop | $1,200 |
The adjusted basis is $1,200 (computed).
Case 2 (computed): the same equipment and expenses, but AGI of $40,000 and allowable itemized deductions of $50,000, which is more than AGI.
| Line | Entry | Value |
|---|---|---|
| 1 | Cost of the equipment (invented) | $2,000 |
| 2 | Includible medical expenses (invented) | $10,000 |
| 3 | Line 1 divided by line 2 (computed) | 0.2 |
| 4 | 7.5% of AGI of $40,000 (computed) | $3,000 |
| 5 | Line 3 times line 4 (computed); itemized deductions of $50,000 were more than AGI, so continue | $600 |
| 6 | Line 1 minus line 5 (computed) | $1,400 |
| 7 | Allowable itemized deductions (invented) | $50,000 |
| 8 | Line 6 divided by line 7 (computed) | 0.028 |
| 9 | AGI (invented) | $40,000 |
| 10 | Line 7 minus line 9 (computed) | $10,000 |
| 11 | Line 8 times line 10 (computed) | $280 |
| 12 | Line 5 plus line 11 (computed) | $880 |
The adjusted basis is $880 (computed). The next step, the gain or loss on the sale, is on the Worksheet E page.
Edition
This page reads Publication 502 (2025), the file irs.gov served on 2026-11-05. Worksheet D sits on page 19 of that edition. Check the year printed on your own copy before following a line reference.
Common mistakes
- Using the sale year’s AGI on line 4. The worksheet uses the year the cost was included in medical expenses.
- Using 7.5% when that year’s limit was 10%. Check Schedule A for that year.
- Stopping at line 5 when itemized deductions were more than AGI. Lines 6 through 11 are required then.
- Entering the cost as the basis. The basis is only the part of the cost that did not reduce your tax.
Related: Publication 502, Worksheet E, and Form 1040 line 12.
Find the right next step for your situation
About how much do you have invested? Pick the range that fits; your next step appears immediately below.
Compare vetted advisors for your finances
For U.S. investors with $250,000 or more in investable assets. WiserAdvisor is an independent service matching you with 2 to 3 vetted advisers. Its form asks for your ZIP code and answers to a few questions; a match is not guaranteed.
Free to request, with no obligation to hire. By submitting, you consent to calls, texts and emails from WiserAdvisor and up to three advisers. Advisers pay for introductions.
Clear Money Guide may earn a referral payment for a qualifying completed form. An introduction is not a Clear Money Guide recommendation.
Opens on WiserAdvisor’s site in a new tab.
Explore optional adviser matching today
Considering financial advice? Request an adviser introduction with no obligation to hire.
The form is run by Kapitalwise, our advisor-matching partner. Requesting an introduction is free. Submitting the form shares your contact details with advisers, so expect calls and texts. Advisers pay for introductions. Clear Money Guide may earn a referral payment for a qualifying submitted form, whether or not you hire anyone. A match is not guaranteed.
The Kapitalwise form opens here; you stay on this page.
What happens when you press the button
It asks about nine questions: age, investable assets, location; then your name, email and phone number, and verifies the phone by text. Nothing loads and nothing reaches Kapitalwise until you press the button.
Prefer flat-fee or hourly pricing instead? Compare ranges here.
Answer againSources
- Publication 502 (2025), Medical and Dental Expenses: https://www.irs.gov/pub/irs-pdf/p502.pdf
- IRS, About Publication 502, Medical and Dental Expenses: https://www.irs.gov/forms-pubs/about-publication-502
Read from the IRS documents linked above on November 5, 2026. General information, not tax advice. Your own facts decide the outcome, and a preparer, the account provider or the IRS is the right place to confirm anything consequential.