The tax implications of transferring stock ownership depend almost entirely on how the transfer happens. A sale triggers capital gains tax immediately for the seller. A gift usually costs nothing at the moment of transfer but hands the recipient your original cost basis, so the tax follows the shares. Death does the opposite: the basis resets to fair market value, and decades of built-up gain can vanish. Divorce transfers are tax-free but preserve the old basis. Charitable donations of appreciated stock can wipe out the gain entirely while producing a deduction. Each path leads to a different bill, paid by a different person, at a different time.
Selling the Stock
Sell shares and you owe tax on the difference between the sale proceeds and your cost basis, which is generally what you paid for the shares plus any commissions.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses Sell above basis and you have a capital gain; sell below and you have a loss.
Holding period controls the rate. One year or less produces a short-term gain taxed at your ordinary income rate, which reaches 37% for 2026.2Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 More than a year, and you qualify for long-term rates of 0%, 15%, or 20% depending on your taxable income.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses For 2026, the 15% rate starts around $49,450 of taxable income for single filers and $98,900 for joint filers, with the 20% rate applying above $545,500 and $613,700 respectively.3Internal Revenue Service. Revenue Procedure 2025-32
Higher earners owe an extra 3.8% Net Investment Income Tax on capital gains once modified adjusted gross income crosses $200,000 for single filers or $250,000 for joint filers.4Internal Revenue Service. Net Investment Income Tax These thresholds are not indexed for inflation. Someone in the top long-term bracket who also owes NIIT faces an effective federal rate of 23.8% on the gain.
Losses and the Wash Sale Rule
Losses offset gains from other sales during the year. If losses exceed gains, up to $3,000 of the net loss can be deducted against ordinary income ($1,500 if married filing separately), and anything left carries forward indefinitely.5Internal Revenue Service. IRS Tax Tip 2003-29, Capital Gains and Losses
One trap catches sellers who try to harvest a loss without giving up the position. Sell at a loss and buy the same or a substantially identical security within 30 days before or after, and the wash sale rule disallows the loss.6Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The rule also applies when your spouse or a corporation you control buys the replacement shares. The disallowed loss is not lost forever; it gets added to the basis of the replacement shares, and the holding period of the original position carries over.7Internal Revenue Service. Publication 550, Investment Income and Expenses
What the Buyer Gets
If someone buys stock from you in a straightforward sale, their basis is the purchase price and their holding period starts the day after the trade. Those numbers stay with them until they sell.
Gifting Stock to Family or Friends
Give stock away and the tax consequences at the moment of transfer are usually zero. The donor, not the recipient, is the one who could theoretically owe federal gift tax, and two shelters mean almost no one does.
For 2026, you can give up to $19,000 worth of stock to any number of individual recipients without any gift tax paperwork.8Internal Revenue Service. What’s New – Estate and Gift Tax Married couples can combine their exclusions and give $38,000 to the same person through gift-splitting. Anything above the annual exclusion to a single recipient triggers a Form 709 filing but not necessarily a tax bill.9Internal Revenue Service. Instructions for Form 709 (2025) Excess gifts eat into your lifetime gift and estate tax exemption, which the One, Big, Beautiful Bill signed in July 2025 set at $15 million per person for 2026. Actual gift tax kicks in only after that $15 million is exhausted.
The Recipient’s Basis
The catch with gifted stock is the carryover basis rule. Whoever receives the shares takes your original cost basis with them.10Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust Buy shares at $10, gift them when they are worth $100, and the recipient’s basis is still $10. When they sell, they owe capital gains tax on the full $90 of appreciation. Your holding period also carries over, so if you held long enough for long-term treatment, they get it too.
A separate rule applies to stock that has dropped below your basis when you gift it. To stop people from shifting paper losses to family, the code says that for purposes of calculating a loss, the recipient’s basis is the lower of your original basis or the fair market value on the gift date.10Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust If the recipient later sells at a price between the two figures, no gain or loss is recognized at all.
Donating Stock to Charity
Handing appreciated stock directly to a qualified charity is often the most tax-efficient transfer available. You get a charitable deduction for the stock’s full fair market value, you recognize no capital gain on the appreciation, and the charity sells tax-free.11Internal Revenue Service. Publication 526, Charitable Contributions Selling first, paying the tax, and donating the cash leaves less on the table for both you and the charity.
To get the full fair market value deduction, the shares must be long-term capital gain property, meaning you held them more than a year. For donations to public charities, the deduction for appreciated stock is capped at 30% of your adjusted gross income, with any unused portion carrying forward up to five years.11Internal Revenue Service. Publication 526, Charitable Contributions Donations to private foundations follow stricter limits.12Internal Revenue Service. Charitable Contribution Deductions
Inheriting Stock
Stock that passes at death gets the most favorable treatment of any transfer method. The beneficiary’s basis resets to the fair market value on the date the owner died, erasing every dollar of appreciation that built up during the decedent’s lifetime.13Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent Inherit shares bought at $5 and worth $200 at death, and your basis is $200. The prior $195 of growth is never taxed. The beneficiary’s holding period is automatically long-term, so any future gain gets the preferential rate from day one.
Alternate Valuation Date
An executor can elect to value estate assets six months after the date of death rather than on the date itself. The election is only available when it reduces both the gross estate and the estate tax liability.14Office of the Law Revision Counsel. 26 USC 2032 – Alternate Valuation If the election is made, the beneficiary’s stepped-up basis uses that later value.
Community Property Doubles the Step-Up
In community property states, when one spouse dies both halves of community property stock step up to fair market value, not just the decedent’s half.13Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent Stock held as joint tenants with right of survivorship in most other states only gets the decedent’s half stepped up. On a large portfolio, the difference can be worth tens of thousands in future capital gains tax.
Retirement Accounts Are Different
The step-up does not reach every inherited asset. Income in respect of a decedent, which includes traditional IRAs, 401(k)s, and deferred compensation, is excluded. Beneficiaries owe ordinary income tax on distributions from those accounts, just as the original owner would have.
Federal Estate Tax
The estate itself may owe federal estate tax, but only above the $15 million exemption for 2026.8Internal Revenue Service. What’s New – Estate and Gift Tax The top marginal rate above that threshold is 40%. Gift and estate exemptions are unified, so lifetime taxable gifts reduce what remains at death. A portability election can let a surviving spouse use the deceased spouse’s unused exemption, potentially sheltering up to $30 million for a couple.15Office of the Law Revision Counsel. 26 USC 2010 – Unified Credit Against Estate Tax
Transfers Between Spouses and in Divorce
Section 1041 treats stock transfers between spouses, and transfers incident to divorce, as tax-free events. The transferring spouse recognizes no gain or loss.16Office of the Law Revision Counsel. 26 USC 1041 – Transfers of Property Between Spouses or Incident to Divorce The receiving spouse takes the transferring spouse’s basis and holding period.
The tax is deferred, not erased. When the receiving spouse sells, they owe capital gains tax on all appreciation dating back to the original purchase. This matters at the settlement table. A brokerage account with $500,000 in stock and a $100,000 basis is not equivalent to $500,000 in cash; it carries $400,000 in embedded gain that will eventually be taxed. Ignoring basis when dividing marital assets is one of the more expensive mistakes in divorce.
One boundary: the tax-free treatment under Section 1041 does not apply when the receiving spouse is a nonresident alien. In that case, the transfer is fully taxable to the transferring spouse.16Office of the Law Revision Counsel. 26 USC 1041 – Transfers of Property Between Spouses or Incident to Divorce
Transfers Into Trusts
Whether moving stock into a trust triggers tax depends on whether the trust is revocable or irrevocable.
Revocable Trusts
Funding a revocable living trust has no immediate tax consequence. Because you keep the power to change or dissolve the trust, the IRS treats the assets as still yours. No gift, no gain, no change to basis. You keep reporting dividends and sales on your personal return. At death, stock in the trust receives the same step-up as any other inherited asset because it is still part of your taxable estate.
Irrevocable Trusts
Moving stock into an irrevocable trust is a permanent transfer, treated as a completed gift. If the value exceeds the $19,000 annual exclusion, you may need to file Form 709 and use part of your lifetime exemption.8Internal Revenue Service. What’s New – Estate and Gift Tax The trust takes your carryover basis, just like an individual recipient.
Who pays income tax on future dividends and gains depends on the trust’s structure. A grantor trust bills the grantor for the trust’s income tax, which is often intentional because the tax paid effectively transfers additional value to beneficiaries without using more exemption. A non-grantor trust pays its own tax under compressed brackets that reach 37% at just $16,150 of taxable income for 2026, making retained gains inside the trust expensive.2Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026
Transfers that skip a generation, such as gifts to grandchildren through a trust, can also trigger the generation-skipping transfer tax. The GST exemption matches the estate tax exemption at $15 million per person for 2026.8Internal Revenue Service. What’s New – Estate and Gift Tax
Qualified Small Business Stock
If the shares being transferred qualify as Qualified Small Business Stock under Section 1202, the math changes. QSBS is stock in a domestic C corporation with aggregate gross assets of $50 million or less, acquired at original issuance. Hold for at least five years and up to 100% of the gain on sale can be excluded from federal income tax, subject to a cap of the greater of $10 million or ten times your adjusted basis. Three years of holding gets 50%, four years gets 75%, five or more reaches the full 100%.17Office of the Law Revision Counsel. 26 USC 1202 – Partial Exclusion for Gain From Certain Small Business Stock Excluded gain is also exempt from the 3.8% NIIT.
Basis rules interact with transfer choices in a particular way here. Gift QSBS and the recipient inherits your basis and your holding period, so they can reach the five-year mark using your time. Pass QSBS through an estate and the step-up wipes out the gain, but the shares also lose QSBS status because the beneficiary did not acquire them at original issuance. Founders and early investors sitting on QSBS have a genuine choice to make between the lifetime exclusion and the step-up at death.
State Taxes
Federal rules are only part of the bill. Most states also tax capital gains, and the rates vary widely. Roughly nine states impose no tax on investment gains at all; the highest-rate states levy above 13% on top of federal liability. For a high-income taxpayer in a high-tax state, the combined federal and state rate on a long-term gain can approach 37%, nearly erasing the federal preference over ordinary income. Before pulling the trigger on any large transfer or sale, check how your state treats the gain.