Capital gains tax on share transfers depends mostly on two things: how long you owned the shares and how much you earn overall. Sell stock you held for more than a year and the federal rate is 0%, 15%, or 20%. Sell within a year and the gain is taxed as ordinary income, up to 37%. High earners add a 3.8% surtax on top. Basis rules, wash sales, and a few special exclusions can move the final number considerably in either direction.
When Selling or Transferring Shares Is Taxable
You owe tax when you “realize” a gain by selling shares for cash or exchanging them for other property, because you’ve converted the investment into something with measurable value.1Office of the Law Revision Counsel. 26 U.S. Code 1001 – Determination of Amount of and Recognition of Gain or Loss
Some transfers don’t trigger tax at all. Transfers between spouses, or to a former spouse as part of a divorce, are tax-free under federal law; the recipient inherits the transferor’s original basis and holding period.2Office of the Law Revision Counsel. 26 U.S. Code 1041 – Transfers of Property Between Spouses or Incident to Divorce Qualifying corporate reorganizations, like certain mergers, defer the tax until you sell the replacement shares. Gifting shares also doesn’t create a taxable event for the donor, though gifts above the annual exclusion of $19,000 per recipient in 2026 may require a gift tax return.3Internal Revenue Service. Gifts and Inheritances 1
How to Calculate the Gain
Your gain equals what you received minus your adjusted cost basis. Basis starts with what you paid, including brokerage commissions and other transaction fees. The amount realized is what came back to you, whether cash, property at fair market value, or both.1Office of the Law Revision Counsel. 26 U.S. Code 1001 – Determination of Amount of and Recognition of Gain or Loss
If you bought shares of the same company at different prices, the IRS defaults to first-in, first-out: your oldest shares are treated as sold first.4Internal Revenue Service. Stocks, Options, Splits, and Traders That’s often the worst outcome, because your earliest lots usually have the lowest basis and produce the biggest gain. The alternative is specific identification. If you bought 100 shares at $20 and another 100 at $45, telling your broker to sell the $45 lot produces a smaller gain. The election has to happen at the trade, with documentation. You can’t reassign lots at tax time.
Sell for less than your basis and you have a capital loss, which has its own rules covered below.
Short-Term vs. Long-Term Rates
Stock held one year or less produces a short-term gain, taxed at your ordinary marginal rate, which reaches 37% at the top bracket. Stock held more than one year produces a long-term gain, taxed on its own schedule.5Office of the Law Revision Counsel. 26 U.S.C. 1222 – Other Terms Relating to Capital Gains and Losses
For the 2026 tax year, the long-term rates and income thresholds are:
- 0% rate: taxable income up to $49,450 (single), $98,900 (married filing jointly), or $66,200 (head of household).
- 15% rate: taxable income from $49,451 to $545,500 (single), $98,901 to $613,700 (married filing jointly), or $66,201 to $579,600 (head of household).
- 20% rate: taxable income above $545,500 (single), $613,700 (married filing jointly), or $579,600 (head of household).
Most investors sit in the 15% bracket. The 0% rate is real and underused; if your total taxable income including the gain stays below the threshold, you owe nothing federally on the long-term portion.
The 3.8% Net Investment Income Tax
Higher earners pay an extra 3.8% on net investment income, capital gains included. The surtax applies once modified adjusted gross income tops $200,000 for single filers, $250,000 for joint filers, or $125,000 for married filing separately.6Internal Revenue Service. Topic No. 559, Net Investment Income Tax It hits the lesser of your net investment income or the amount by which income exceeds the threshold, and those thresholds aren’t indexed to inflation, so more filers cross them each year. Combined with the 20% long-term rate, the top federal rate on long-term gains is effectively 23.8%.7Internal Revenue Service. Questions and Answers on the Net Investment Income Tax
Basis for Inherited and Gifted Shares
How you got the shares changes the math, and this is where taxpayers most often over- or underreport.
Inherited Shares
Inherited stock gets a stepped-up basis to fair market value on the date the previous owner died. If your parent paid $5,000 and the stock was worth $80,000 at death, your basis is $80,000, and the appreciation during their lifetime is never taxed.8Office of the Law Revision Counsel. 26 U.S.C. 1014 – Basis of Property Acquired From a Decedent Sell soon after inheriting and the gain is close to zero. Inherited shares also automatically qualify for long-term rates, regardless of how long the decedent held them.
Gifted Shares
Gifted stock is different. For calculating a gain, you carry over the donor’s original basis. If your aunt paid $10,000 for stock worth $25,000 when she gave it to you, your basis for gain purposes is $10,000.9Office of the Law Revision Counsel. 26 U.S.C. 1015 – Basis of Property Acquired by Gifts and Transfers in Trust
If the fair market value at the time of the gift was lower than the donor’s basis, you use the lower fair market value for calculating a loss. Sell for a price between the donor’s basis and the gift-date value and you recognize neither gain nor loss. This dual-basis rule catches plenty of people who assume the donor’s number always controls.
The Wash Sale Rule on Losses
Sell shares at a loss and buy substantially identical stock within 30 days before or after the sale, and the loss is disallowed. The 61-day window (30 days each side plus the sale date) prevents harvesting a loss while keeping the same position.10Office of the Law Revision Counsel. 26 U.S.C. 1091 – Loss From Wash Sales of Stock or Securities
The loss isn’t gone forever. The disallowed amount adds to the basis of your replacement shares, reducing gain when you eventually sell them, and your holding period tacks on the time you held the original shares. The rule covers stocks, bonds, mutual funds, and ETFs, and it applies across accounts, including IRAs. Triggering a wash sale by rebuying inside an IRA is especially costly, because you can’t add basis to an IRA, so the loss is effectively lost.
Loss Deduction Limits and Carryforwards
When losses exceed gains for the year, you can deduct up to $3,000 of the net loss against ordinary income ($1,500 if married filing separately).11Office of the Law Revision Counsel. 26 U.S.C. 1211 – Limitation on Capital Losses The rest carries forward. A $20,000 net loss produces a $3,000 deduction this year and $17,000 carried into future years, with no expiration.12Internal Revenue Service. Topic No. 409, Capital Gains and Losses Losses on personal-use property don’t count; the asset must have been held for investment or business.
Section 1244 Small Business Stock Losses
Losses on qualifying small domestic corporation stock can sometimes be treated as ordinary rather than capital, which sidesteps the $3,000 cap. You can deduct up to $50,000 per year, or $100,000 on a joint return, under Section 1244.13Office of the Law Revision Counsel. 26 U.S.C. 1244 – Losses on Small Business Stock Anything above those limits falls back to standard capital loss treatment.
The Qualified Small Business Stock Exclusion
Section 1202 offers one of the largest breaks available to individual investors. Hold stock in a qualifying C corporation long enough and you can exclude some or all of the gain from federal tax.14Office of the Law Revision Counsel. 26 U.S.C. 1202 – Partial Exclusion for Gain From Certain Small Business Stock
For stock acquired after September 27, 2010, the exclusion is 100% at a five-year hold. Recent legislation added a graduated structure for stock acquired under the new rules: 50% at three years, 75% at four, 100% at five or more. The maximum excludable gain per issuer is the greater of $10 million (or $15 million under the newer rules) or ten times your adjusted basis.
The company must be a domestic C corporation with aggregate gross assets of $50 million or less when the stock was issued, and you must have acquired the shares at original issuance rather than on the secondary market. S corporations, partnerships, and LLCs taxed as partnerships don’t qualify. For founders and early investors, confirming eligibility before selling can eliminate tax on millions.
Estimated Tax on Large Gains
Sell a big position mid-year and you may need to make a quarterly estimated payment rather than wait until April. The IRS imposes an underpayment penalty if you owe more than $1,000 at filing and haven’t hit one of two safe harbors: paying at least 90% of the current year’s tax, or 100% of last year’s tax (110% if your prior-year AGI was above $150,000).15Internal Revenue Service. Underpayment of Estimated Tax by Individuals Penalty
The 2026 quarterly deadlines are April 15, June 15, and September 15 of 2026, plus January 15, 2027. You can skip the January installment if you file the full 2026 return by February 1, 2027, and pay in full then.16Internal Revenue Service. 2026 Form 1040-ES If the sale happened after a quarterly deadline, you can annualize income on Form 2210, Schedule AI so you aren’t penalized for periods before the gain existed.
Reporting Share Transfers on Your Return
Your broker sends a Form 1099-B with proceeds, dates, and usually cost basis for each sale.17Internal Revenue Service. About Form 1099-B, Proceeds From Broker and Barter Exchange Transactions You list each transaction on Form 8949, separating short-term from long-term. Totals from Form 8949 flow to Schedule D of your Form 1040, which calculates your net gain or loss.18Internal Revenue Service. Instructions for Form 8949
Form 8949 asks whether the broker reported basis to the IRS (Box A or D). If it did, the IRS already has that number and will match it against your return. If it didn’t, accuracy is on you. Check the 1099-B against your own records, especially for employee stock plan shares, reinvested dividends, and shares involved in mergers or spinoffs. Brokers often get basis wrong on those.
Keep purchase confirmations, 1099-B forms, and basis documentation for at least three years after filing.19Internal Revenue Service. How Long Should I Keep Records Underreport income by more than 25% and the IRS has six years to audit, so hold records longer for large transactions.
Penalties and State Tax
Missing or understating a gain can trigger an accuracy-related penalty of 20% of the underpaid tax when the IRS finds negligence or a substantial understatement.20Internal Revenue Service. Accuracy-Related Penalty Pay late and a separate failure-to-pay penalty runs at 0.5% of the unpaid balance per month, capped at 25%.21Internal Revenue Service. Failure to Pay Penalty Interest accrues on unpaid amounts from the due date. Pay electronically through EFTPS or mail a check with Form 1040-V.22Internal Revenue Service. About Form 1040-V, Payment Voucher for Individuals
State tax adds another layer. Most states treat capital gains as ordinary income, and a handful impose no state income tax. In a taxing state, the combined federal and state rate on a large gain can top 30%, so factor state exposure in before you sell.