How Capital Gains Tax Works — and How to Pay Less
When you sell an investment for more than you paid, the profit is a capital gain — and the tax you owe depends heavily on how long you held it. Here is how the rates work, the difference between short-term and long-term, and the legal moves that keep more of your gain.

The short answer: you are taxed on the profit, and timing changes the rate#
A capital gain is simply the profit you make when you sell something for more than you paid — a stock, a fund, a rental property, even a business. You are not taxed while it grows; you owe capital gains tax only when you sell and lock in the profit. And the single biggest factor in how much you owe is not the size of the gain but how long you held the asset.
In the US, an asset held more than a year gets the favourable long-term rates of 0%, 15% or 20%, while one sold within a year is a short-term gain taxed as ordinary income — often a much higher rate. That one distinction, long-term versus short-term, can change your tax bill dramatically on the exact same profit, which is why patient investors keep so much more of what they earn.
This guide explains what counts as a capital gain, how the long-term brackets work, how dividends and the extra net investment income tax fit in, and the legal moves — from holding periods to tax-loss harvesting to tax-advantaged accounts — that shrink the bill. It also covers how Canada taxes gains through its inclusion-rate system. One note: this is general education, not tax advice.
- A gain is the profit when you sell — buy price versus sale price.
- You are taxed only when you sell — unrealised gains are not taxed.
- Holding over a year unlocks the lower long-term rates.
- Where you hold matters — tax-advantaged accounts can defer or erase the tax.
What counts as a capital gain#
Your gain is the difference between what you sell an asset for and your cost basis — generally what you paid, plus commissions and certain adjustments. Sell 100 shares you bought for $5,000 for $8,000 and you have a $3,000 capital gain. Sell for $4,000 and you have a $1,000 capital loss, which is useful, because losses offset gains.
The crucial word is realised. A stock that doubles on paper costs you nothing in tax until you actually sell it — an unrealised gain is untaxed. That gives you real control over timing: you decide the tax year in which a gain lands. It is one of the quiet advantages of investing over earning a salary, where the tax is withheld before you ever see the money.
Short-term versus long-term gains#
This is the distinction that matters most. Hold an asset for more than one year before selling and the profit is a long-term capital gain, taxed at the preferential 0/15/20% rates. Sell in one year or less and it is a short-term capital gain, taxed at your ordinary income-tax rate — which for many people is meaningfully higher.
The practical lesson writes itself: whenever it fits your plan, crossing that one-year mark before you sell can cut the tax on the gain substantially. The overview at Wikipedia’s entry on capital gains tax in the United States lays out the mechanics. It is rarely worth holding a bad investment just for the tax break, but among good options, patience is quite literally rewarded by the tax code.
The 2026 long-term rates and brackets#
Long-term gains are taxed at 0%, 15% or 20%, and which bracket you land in depends on your total taxable income. Many people are surprised that the lowest bracket is 0% — a real rate of zero on long-term gains for those with modest taxable income. Most middle-income investors fall in the 15% band, and only high earners reach 20%.
Because the rate depends on your income, the tax on a gain is not fixed — the same profit can be taxed at 0% in a low-income year and 15% or 20% in a high-income year. The official figures and current-year thresholds are on the IRS guide to capital gains and losses. This is why planning *when* you realise gains, around your income, can matter as much as the gain itself.
Dividends and the extra 3.8% tax#
Two related pieces complete the picture. Qualified dividends — most dividends from US stocks you have held long enough — are taxed at the same favourable 0/15/20% long-term rates, while ordinary (non-qualified) dividends are taxed as regular income. So the type of income, not just the amount, drives the rate.
On top of that, higher earners may owe the Net Investment Income Tax (NIIT) — an extra 3.8% on investment income above certain income thresholds. It is easy to forget because it is separate from the headline capital-gains rate, but for high earners it effectively lifts the top rate on gains and dividends. Factor it in if your income is high enough to trigger it.
How to legally pay less#
You have more control over capital gains tax than almost any other tax, because you choose when to sell. The most powerful moves are simple. Hold for more than a year to get long-term rates. Harvest losses — selling losers to offset gains, mindful of the wash-sale rule that disallows the loss if you buy the same security within 30 days before or after the sale. And use tax-advantaged accounts: gains inside the best retirement accounts grow tax-deferred or even tax-free, sidestepping the annual drag entirely.
Two more matter at the extremes. Assets you leave to heirs generally get a step-up in basis at death, wiping out the built-in gain for them. And when you sell your main home, you can exclude up to $250,000 of gain if single, or $500,000 if married filing jointly. Used together with the broader ideas in how to reduce your taxes, these tools keep far more of your profit in your pocket.
A worked example#
Put numbers on it. You buy $20,000 of an index fund and sell years later for $35,000 — a $15,000 gain. If you held more than a year and sit in the 15% bracket, you owe about $2,250. Sell instead within a year, as a short-term gain taxed at, say, a 32% ordinary rate, and the bill jumps to $4,800 — more than double, on the identical profit.
Now suppose that same fund is held inside a tax-advantaged retirement account: depending on the account, the gain may be tax-deferred until withdrawal or entirely tax-free. Same investment, three very different outcomes — driven entirely by how long you held it and where. That is the whole game of capital gains tax in one example. The numbers are illustrative; your real result depends on your income and the current brackets.
Funds, ETFs and tax efficiency#
Where your money sits also shapes the tax you cannot see. Frequently traded funds can pass through capital gains distributions each year, creating a tax bill even if you never sold a share. This is one reason broad, low-turnover index funds and ETFs tend to be more tax-efficient than actively traded funds.
It is worth understanding these differences when choosing between index funds and ETFs, because in a taxable account tax efficiency compounds over the years just like returns do. A fund that generates fewer taxable events each year lets more of your money stay invested and keep growing, which over decades is a meaningful edge.
For Canadians: the inclusion-rate system#
Canada taxes capital gains very differently — there is no separate long-term rate. Instead, only a portion of your gain, set by the capital gains inclusion rate of 50%, is added to your income and taxed at your marginal rate. So if you realise a $10,000 gain, $5,000 is taxable and the other half is effectively tax-free, whatever your bracket.
The rest of the system rewards using registered accounts. Gains inside a TFSA are completely tax-free, and an RRSP defers tax until withdrawal, so both shelter growth from the inclusion rule. Your principal residence is generally exempt from capital gains tax entirely. The Canada Revenue Agency’s guide to capital gains has the current details and forms.
Mistakes to avoid#
None of these are exotic. They are the ordinary slip-ups that hand the tax office more than necessary, and every one is avoidable with a little planning.
- Selling just before the one-year mark — a day early can turn a long-term gain into a costly short-term one.
- Triggering the wash-sale rule — rebuying the same security within 30 days before or after voids the loss.
- Ignoring tax-advantaged accounts — paying tax annually on gains you could have sheltered.
- Forgetting the 3.8% NIIT — a surprise for higher earners at tax time.
- Overlooking loss harvesting — leaving losses unused instead of offsetting gains.
- Not tracking your cost basis — overpaying because you cannot prove what you paid.
The bottom line#
Capital gains tax rewards two things above all: patience and location. Holding more than a year unlocks the lower long-term rates, and holding inside a tax-advantaged account can defer or erase the tax altogether. Because you choose when to sell, you have a rare degree of control — over the timing, the bracket, and whether losses offset the gains.
So treat the sell decision as a tax decision too, not just an investment one. Mind the holding period, harvest losses when it makes sense, shelter what you can, and keep clean records of your cost basis. Do that, and capital gains tax stops being a nasty surprise and becomes just another variable you manage — one that quietly leaves thousands more in your account over an investing lifetime.
Frequently asked questions
Frequently asked questions
Capital gains tax is the tax on the profit you make when you sell an asset — such as a stock, fund or property — for more than your cost basis. You are taxed only when you sell and realise the gain, not while the asset grows in value. In the US, how long you held the asset determines the rate: over a year gets preferential long-term rates, a year or less is taxed as ordinary income.
Educational content — not personalised financial advice.
Read next

Moving Abroad: What Happens to Your Taxes, Accounts and Pension
What happens to your money when you move abroad: how tax residence actually works, why US citizens keep filing wherever they live, the exclusion and the credit that prevent double taxation, states that keep taxing former residents, FBAR and Form 8938 reporting, what happens to a 401k or IRA, pensions and health cover across borders, and how leaving works in Canada, Spain, France and Russia.

What to Do If You Can’t Pay Your Taxes: Payment Plans, Penalties and Relief
What to do if you cannot pay your taxes: why filing on time matters more than paying on time, what penalties and interest actually cost, how to set up an IRS payment plan, what happens when the debt is genuinely unpayable, what the tax authority can do without a court order, how to avoid tax-relief scams, and how the same problem is handled in Canada, Spain, France and Russia.

Tax-Deductible Donations: How to Give to Charity Tax-Efficiently
How tax-deductible donations really work: why you usually have to itemize, the new 2026 deduction for non-itemizers, AGI limits, donating appreciated stock to skip capital gains, donor-advised funds, Qualified Charitable Distributions for retirees, and how giving is taxed in Canada and Europe.