The Year Dad Went Into Care, She Sold $200,000 of the Stock He’d Held Since 1995. The Nursing-Home Bills Erased the Entire Gain

Selling a parent's long-held stock to cover nursing home bills can trigger a massive capital gains tax bill, or almost no tax at all, and the difference comes down to one detail most families get wrong before they ever call…

Published September 16, 2026, 2:26pm ET · 3 min read

Life After Work desk. Editor: David Beren.

This post may contain links from our sponsors and affiliates, and Flywheel Publishing may receive compensation for actions taken through them.

Caregiver, holding hands or old man in wheelchair at nursing home, support or trust for rehabilitation. Assisted living, nurse or senior person with disability for medical care, comfort or kindness
© PeopleImages / Shutterstock.com

If your parent entered a nursing home this year and you sold a long-held stock position to cover the bills, Internal Revenue Code section 213 can quietly absorb most or all of the capital gain. A family can sell $200,000 of Microsoft (NASDAQ:MSFT | MSFT Price Prediction) stock held since 1995, realize a large embedded gain, and end the year owing surprisingly little federal tax. The same fact pattern, structured slightly wrong, produces a full tax bill with no offset.

One Family’s Year, Under a Tax Microscope

In this scenario, the dad has held Microsoft shares since 1995. With two 2-for-1 splits and a share price around $495.67, the cost basis is negligible relative to the current value. He enters skilled nursing care in January, so the family liquidates $200,000 of the position to cover the year, creating a large long-term capital gain. Nursing home invoices become an itemized medical deduction under section 213. On the same return, one absorbs the other.

How Nursing Care Turns Into a Medical Deduction

Section 213 lets a taxpayer who itemizes deduct qualified medical expenses exceeding 7.5% of adjusted gross income. Nursing home costs qualify in full, including lodging and meals, if the principal reason for admission is to receive medical care. A physician’s certification and the facility’s breakdown of skilled versus custodial charges matter. If Dad is in the facility primarily for custodial reasons, only the specifically medical portion counts, and the math changes completely.

Floor That Rises With Every Share Sold

Selling appreciated stock lifts adjusted gross income, and the 7.5% deduction floor is calculated against that higher AGI. The offset is real but smaller than a straight dollar-for-dollar match, because a larger sale raises the floor and shrinks the deduction. Long-term capital gains are taxed at preferential rates rather than ordinary rates, offsetting income taxed at 0%, 15%, or 20% depending on total taxable income, plus a possible 3.8% Net Investment Income Tax once modified AGI passes $200,000 single or $250,000 joint. Running the actual numbers matters more than eyeballing them.

Whose Return the Sale Belongs On

This is the trap that ruins the strategy. If Dad pays his own care costs and sells his own stock, the gain and deduction both land on his return, and the offset works cleanly. If the daughter pays the facility or sells stock held in her name, the deduction lives on her return only if she can treat Dad as a qualifying relative for medical-expense purposes. That test is stricter than most assume, and siblings may need a multiple-support agreement when they share the cost. Get this wrong, and the sale creates a fully taxable gain against no deduction.

Stepped-Up Basis You Gave Away

Stock bought in 1995 carries a very low basis and large embedded gain. Sell it during Dad’s lifetime, and you realize that gain. Hold it until death, and heirs inherit it with a stepped-up basis under Internal Revenue Code section 1014, resetting the basis to fair market value on the date of death and typically wiping out the gain entirely. Selling the oldest, lowest-basis holding first trades away a step-up you may never recover. When care must be paid for, and the section 213 deduction absorbs the gain, that trade can be worth it. When other assets are available, the appreciated position is frequently the wrong one to touch.

State Tax, Medicaid, and What to Establish First

State treatment of capital gains and medical deductions varies, and the answer can flip depending on where Dad files. Large care costs also tend to recur across several years, changing sale timing. Spending down assets on care has Medicaid eligibility consequences that sit outside the tax question and belong with an elder law attorney. Section 213 is one of several IRS rules that quietly decide whether a retirement is drained or preserved (we charted nine of them in a free tax trap map if you want the full picture).

First, establish whose return the sale and payment need to land on. Fix that first, and section 213 can do the work the fine print promises. Get it wrong, and $200,000 of long-held stock funds the nursing home and the IRS in the same year, raising concerns as big as getting the right level of care.

Contact [email protected] for any questions or corrections.

David Beren

David Beren has been a Flywheel Publishing contributor since 2022. Writing for 24/7 Wall St. since 2023, David loves to write about topics of all shapes and sizes. As a technology expert, David focuses heavily on consumer electronics brands, automobiles, and general technology. He has previously written for LifeWire, formerly About.com. As a part-time freelance writer, David’s “day job” has been working on and leading social media for multiple Fortune 100 brands. David loves the flexibility of this field and its ability to reach customers exactly where they like to spend their time. Additionally, David previously published his own blog, TmoNews.com, which reached 3 million readers in its first year. In addition to freelance and social media work, David loves to spend time with his family and children and relive the glory days of video game consoles by playing any retro game console he can get his hands on.

All articles →