Skip to content

How investments are taxed

Investment returns are taxed in two broad ways: income in the year it arrives, and capital gains on the increase above what the asset cost, usually only when the asset is sold. Timing matters alongside the rate: tax paid each year stops compounding, and the longer the horizon the more that costs.

In short

  • Investment returns get one of two broad tax treatments: income, taxed in the year it is received, and capital gains, taxed on the increase in value above what the asset cost and generally only when it is sold.
  • A capital gain is measured against cost basis, so tax is charged on sale proceeds minus basis rather than on the sale price, and a distribution that was taxed when received and then reinvested adds to basis so the same money is not taxed twice.
  • In the United States most ordinary holdings are taxed only when a sale or other disposal happens, so an unrealised gain keeps compounding untaxed, but the postponed tax is owed when the sale eventually comes.
  • Holding period changes the rate on a gain rather than the size of the gain: in the United States a gain realised inside the statutory holding period is taxed at ordinary income rates, and one realised after it meets a separate capital gains schedule. Where that line sits is set by legislation, so it is a rule to look up rather than a constant.
  • In the United States a pooled fund passes its realised gains to whoever holds it, so someone holding that fund in a taxable account can owe capital gains tax in a year they bought nothing, sold nothing and watched the holding fall in value. Not every country pushes fund gains out to holders this way.
  • A tax-advantaged account does not change what you own. It changes when, and sometimes whether, tax is charged on the returns inside it, which is why rebalancing inside one usually creates no tax bill. Which accounts exist, and exactly what each one shelters, is set by national law.

Two treatments: income and capital gains

Everything an investment produces arrives as one of two things, and tax systems handle them differently.

Income is money the holding pays out: interest on a deposit or a bond, rent from a property, a dividend from a share, or income a fund passes through. It is taxed in the year it is received, on the whole amount, whether you spend it or reinvest it.

A capital gain is the increase in what the holding itself is worth. It is measured against cost basis, what the asset cost you including buying costs, and the tax falls on the difference rather than on the sale price:

gain=proceedscost basis\text{gain} = \text{proceeds} - \text{cost basis}

AspectIncomeCapital gain
Taxed whenThe year it is receivedThe year the asset is sold
Taxed onThe whole paymentProceeds minus cost basis
Can it waitRarely: the payment is the eventYes, by continuing to hold

In the United States, ordinary income and long-term capital gains run on two separate federal schedules, and the gain schedule is generally the lower of the two. The split is not tidy. Qualified dividends are income that meets the gain schedule when the payer and the holding period qualify, most interest on state and local government bonds escapes federal income tax, and an extra layer applies to investment income above an income threshold. Other countries draw the same line in their own places, and a few do not draw it at all.

Characterisation is therefore the first question in any tax calculation, because it decides which schedule applies before any rate is looked up.

Realised and unrealised: tax needs a trigger

An unrealised gain is one you hold on paper: the asset is worth more than it cost and you still own it. A realised gain is one where a taxable event has happened, usually a sale. In the United States most ordinary holdings are taxed only at that second point.

That is not a paperwork distinction: money that has not gone to tax is still compounding for you. Take an assumed 7 percent a year for 30 years and an illustrative 30 percent tax rate, both picked to keep the arithmetic readable. A dollar left alone reaches 7.6123, and paying 30 percent on the 6.6123 of gain at the end leaves 5.6286. Hand over the same 30 percent every year instead, as generally happens when the return arrives as taxable interest in a taxable account, and the dollar compounds at 4.9 percent and reaches 4.2001. Same investment, same rate, and the deferred dollar ends about 34 percent higher. That gap is earned year by year rather than granted at the start: shorten the run to five years and the same two routes finish within 1 percent of each other.

Taxing at the end and taxing along the way are two different expressions:

Aend=P[(1+r)n(1t)+t]Aannual=P[1+r(1t)]nA_{\text{end}} = P\left[(1 + r)^n (1 - t) + t\right] \qquad A_{\text{annual}} = P\left[1 + r(1 - t)\right]^n

The stray tt in the first is the deferral advantage: tax you have not paid yet is still invested and earning.

Deferral is not forgiveness. The bill lands when you sell, and selling for any reason, including switching funds or rebalancing, ends it for that holding. Three things end it without a decision from you: a fund realises gains on your behalf, certain instruments are marked to market by statute rather than on sale, and a taxable bond issued at a discount accrues income each year while paying no cash. In the United States one thing ends it without the tax ever being collected: assets held until death generally have their basis reset to market value in the heir's hands, which erases an unrealised gain and equally erases an unrealised loss. That is a legislated rule rather than a law of arithmetic.

Why the holding period can change the rate

Two people can realise the same gain on the same share and meet different rates. Their own income is one reason the rate differs; in the United States how long the asset was held is the other, and it is the one the seller controls.

The mechanism is a step, not a slope. A gain realised inside the statutory holding period is short-term and is taxed at ordinary income rates. A gain realised after it is long-term and meets the separate capital gains schedule. Crossing the line moves the whole gain, not just the part that accrued after it. Where the line sits, and the rates either side of it, are set by legislation and have been rewritten before, so they are figures to check rather than constants.

Three details decide which side a sale lands on:

  • The clock runs from acquisition to sale, counted on trade dates rather than settlement dates, and in the United States it starts the day after the buy, which is what makes a sale on the anniversary itself land a day short.
  • Which shares you sold is a choice, until it is not. Lots bought at different times carry different bases and holding periods. Identifying the lot at the time of sale lets you pick; leave it and a default method decides.
  • Buying straight back postpones a loss rather than restarting the clock. A loss is disallowed where substantially identical securities are bought within a window either side of the sale. It is not destroyed: it is added to the basis of the replacement shares, and the old holding period carries over.

Losses are not wasted either. Realised losses net against realised gains, and in the United States a net loss can offset a capped amount of ordinary income each year, with the rest carried forward. Selling a loser deliberately to use that netting is tax loss harvesting, which the rule above keeps from being free in a second sense too: it lowers the basis of whatever is bought back, so part of what it saves now is borrowed from a larger gain later. Outside the United States the holding period may do nothing: some countries tax gains as ordinary income however long they were held.

Why a fund hands you a gain you did not take

A pooled fund is a pass-through, not a taxpayer. In the United States a fund that distributes substantially all of its income and realised gains each year is generally not taxed at the fund level, and those amounts are taxed instead to whoever held shares on the record date, in proportion to what they held.

So the manager's selling becomes your taxable event. When the fund sells an appreciated holding, whether to follow its strategy, to track an index change or to raise cash for investors leaving, the realised gain is distributed and reported as yours. It can arrive in a year when you bought nothing, sold nothing and watched your own shares fall. Buying shortly before a distribution is the sharpest version: the payment arrives, the fund's net asset value drops by the same amount, and you hold a tax bill for a gain earned before you arrived.

  • Turnover drives the size of it. A fund that rarely sells has little realised gain to pass on, which is part of why broad index funds distribute less in capital gains than actively traded ones. Dividends and interest still come through either way.
  • Structure drives it too. In the United States an ETF can meet redemptions in kind, handing securities to an authorised participant rather than selling them, so low-basis holdings can leave without realising a gain. A mutual fund meeting redemptions in cash covers them from cash on hand and from new money first, and sells once that runs short.
  • Reinvested distributions raise basis. They were taxed when received, so adding them is what stops the same money being taxed a second time on sale.
  • Character passes through. A distributed long-term gain keeps that character in your hands, and interest a bond fund collects is still income when it reaches you.

A fund realising part of its return each year therefore lands between the two lines above.

What a tax-advantaged wrapper actually changes

A tax-advantaged account is not an investment. It is a container with a tax rule attached, and the same fund held inside it behaves identically apart from the tax.

It can change three things, and which of them a given account changes is set by the law that created it:

  • Timing. In the United States, interest, dividends and realised gains inside the wrapper are not taxed in the year they happen, so the whole return stays invested and keeps compounding. Some countries tax earnings inside the wrapper instead and give the relief elsewhere.
  • Whether. A qualifying withdrawal from an exempt-style wrapper is not taxed at all, while a deferred-style wrapper taxes the withdrawal instead of the contribution.
  • Character. In the United States a deferred wrapper usually pays out as ordinary income, so a gain that would have met the capital gains schedule in a taxable account meets the income schedule on the way out. What a wrapper gives on timing it can take back on character.

Two consequences follow. Rebalancing inside a wrapper generally triggers no tax at all, which makes the account you rebalance in a decision of its own. And a loss inside a wrapper is nobody's deduction, so the netting rules above cannot reach it.

Asset location falls out of the same mechanism. A return taxed heavily as income every year gains the most from being sheltered, while a return that is mostly unrealised appreciation already defers itself. The character point above pulls the other way, because a deferred wrapper can turn a gain that would have met the capital gains schedule into ordinary income on the way out. Which effect wins depends on the return, the horizon and the two rates, so the ordering is an argument with figures on both sides rather than a settled rule. For a particular person it also turns on contribution limits, access rules and what is already in each account. Tax withheld at source on foreign dividends is often deducted whatever the wrapper.

The mechanism travels and the account names do not. The choice between paying tax now and paying it later turns on two tax rates rather than on the investment, which tax-advantaged accounts works through.

Read the whole thing as one after-tax rate

Every mechanism on this page does one thing to a return: it changes the rate you actually compound at. Set them side by side on the same assumed 7 percent gross return, the same illustrative 30 percent rate on whatever is taxable, and 30 years.

What the tax doesCompounds atThenA dollar ends atAfter-tax rate
Nothing realised until the end7 percentOne tax bill on 6.6123 of gain5.62865.9286 percent
Two fifths realised each year6.16 percent, to 6.0093A further bill on the 3.4154 still unrealised4.98475.5005 percent
All taxed as it arrives4.9 percentNothing left to pay4.20014.9000 percent

One tax rate, three answers, and nothing about the investment changed. That is why the figure worth comparing between two holdings is the after-tax return, and why the compound interest calculator is worth running twice, gross and after tax.

Four cautions on that table:

  • A deferred tax is a liability, not equity. A large unrealised gain on a statement is a number with a bill attached, so ranking it against an already taxed balance flatters it.
  • The rates are assumptions, and one rate for every row is the boldest of them. Holding the tax rate fixed is what isolates timing, but in practice interest and a long-held gain usually meet different schedules, so a real comparison moves the rate and the timing together. A real return also arrives as a sequence rather than a fixed number.
  • The horizon is doing much of the work. These figures are 30-year figures. Over five years the deferred and the annually taxed routes finish within about 1 percent of each other, so the case for deferral is a case about time, not a constant.
  • The tax answer is not the investment answer. A holding that is poor and tax-efficient is still poor, and a realised loss is a real loss carrying at best a deduction, worth something only against gains or against the capped slice of ordinary income above.

The machinery is stable and the settings are not. Rates, thresholds, holding periods and which wrappers exist are written by legislatures and revised, so this page sets out the mechanism and leaves the numbers to be looked up where you pay tax. It is educational material rather than tax or investment advice.

Worked examples

A dollar held for 30 years, taxed once at the end

One dollar is invested at an assumed 7 percent a year for 30 years. Nothing is sold along the way, so nothing is realised until the end. What is it worth, and what is left after an illustrative 30 percent tax on the gain?

  1. Nothing is realised, so the full return compounds: 1×1.07301 \times 1.07^{30}.
  2. Thirty multiplications by 1.07 give a growth factor of 7.6123, so the holding is worth 7.6123.
  3. The gain is what is above cost basis, and basis here is the original 1, so the gain is 6.6123.
  4. Tax the gain once, at the end: 6.6123×0.30=1.98376.6123 \times 0.30 = 1.9837.
  5. Subtract it: 7.61231.9837=5.62867.6123 - 1.9837 = 5.6286.

The holding reaches 7.6123 and 6.6123 of that is gain, none of it taxed while it was unrealised. Selling at the end costs 1.9837 in tax, almost twice the dollar that started the whole thing, and leaves 5.6286. The rates are assumptions chosen to keep the arithmetic readable rather than figures looked up anywhere.

The same dollar when the return is taxed every year

Same dollar, same assumed 7 percent, same illustrative 30 percent rate, same 30 years. This time the whole return arrives as something taxed in the year it is received, such as interest in a taxable account. What is it worth at the end?

  1. Tax takes 30 percent of each year's return as it arrives, so what compounds is 0.07×0.70=0.0490.07 \times 0.70 = 0.049, meaning 4.9 percent.
  2. Thirty years at that rate: 1.04930=4.20011.049^{30} = 4.2001.
  3. All the tax has already been paid, so 4.2001 is the after-tax figure, of which 3.2001 is what the dollar earned and kept.
  4. Set it against the deferred route, which left 5.6286 after its single tax bill.

The annually taxed dollar ends at 4.2001, with 3.2001 of after-tax growth, against 5.6286 for the identical investment taxed only at the end. That is about 34 percent more from deferral alone. The tax rate was 30 percent in both cases: what differed was when the 30 percent was charged, and therefore how much money was left compounding in the years after.

A fund that realises two fifths of its return each year

The same dollar sits in a fund earning the same assumed 7 percent a year. Each year the fund realises two fifths of that return and distributes it, taxed at the illustrative 30 percent, with the rest of the distribution reinvested. The other three fifths stay as unrealised appreciation. Where does 30 years leave it?

  1. Two fifths of a 7 percent return is 2.8 percent distributed, so the share price only carries the remaining 4.2 percent.
  2. Tax the distribution and reinvest the rest: 2.8×0.70=1.962.8 \times 0.70 = 1.96 percent goes back in.
  3. The holding therefore compounds at 4.2+1.96=6.164.2 + 1.96 = 6.16 percent, and 1.061630=6.00931.0616^{30} = 6.0093.
  4. Of that 6.0093, the earnings are 5.0093, and 1.5939 of basis was added by the reinvested distributions, so basis has grown from 1 to 2.5939.
  5. That leaves 6.00932.5939=3.41546.0093 - 2.5939 = 3.4154 still unrealised. Selling at the end costs 3.4154×0.30=1.02463.4154 \times 0.30 = 1.0246, so 4.9847 remains.

The fund holding reaches 6.0093 before the final sale, having already paid tax each year on the gains the manager chose to realise. After the tax on the 3.4154 that is still unrealised, 4.9847 is left, which sits between 5.6286 for the untouched holding and 4.2001 for the fully taxed one. Nobody asked for those annual distributions. Deferring everything was worth 1.4285 more than paying as you go, and realising two fifths of the return each year gave up 0.6439 of that, nearly half.

The same result stated as one after-tax rate

Deferring tax turned an assumed 7 percent gross return into 5.6286 after 30 years and one tax bill. What annual rate, compounded for the same 30 years, produces the same ending figure?

  1. Find the rate gg where 1×(1+g)30=5.62861 \times (1 + g)^{30} = 5.6286.
  2. Solving gives g=0.059286g = 0.059286, which is 5.9286 percent a year.
  3. Compare it with the annually taxed version, which compounded at exactly 4.9 percent by construction.
  4. Both paid the same illustrative 30 percent rate on the same assumed 7 percent gross return.

Over 30 years, deferral turns 7 percent gross into 5.9286 percent after tax, while paying the same rate as you go turns it into 4.9 percent. Just over one percentage point a year is the price of realising a return early on these assumptions. That figure belongs to the 30-year horizon rather than to deferral itself: run the same two routes for five years and they sit about a fifth of a point apart, and for forty years about 1.2 points apart. The advantage accumulates, so it is smallest exactly when a reader is most tempted to treat it as a rule of thumb.

Common questions

Do I owe tax on an investment that has gone up if I have not sold it?

In the United States, generally no. Most ordinary holdings are taxed when a sale or other disposal happens, so an unrealised gain produces no tax bill and the full amount keeps compounding. The exceptions are written into statute rather than left to judgement: certain contracts are marked to market at the end of the year, some offshore fund holdings have a regime of their own, and a taxable bond issued at a discount accrues income each year although it pays no cash. Income is a separate matter. Interest and dividends are taxed in the year they are received whether or not anything is sold, and whether or not they are reinvested. Postponement is also not cancellation: the tax on an unrealised gain is owed when the sale finally comes, so a large untaxed gain on a statement is a figure with a bill attached to it.

Why did my fund distribute a capital gain when I did not sell anything?

Because in the United States a pooled fund passes its realised gains to the people who hold it. A fund avoids tax at the fund level by distributing substantially all of its income and realised gains each year, so when the manager sells an appreciated holding, that gain is reported to whoever held shares on the record date. It can land in a year your own shares fell, and it can land days after you bought in. The distribution also lowers the fund's net asset value by the amount paid out, so it is not new money arriving. Turnover is what drives the size of it, which is why funds that trade rarely tend to distribute less in capital gains, and why an exchange traded fund that can meet redemptions in kind tends to distribute less again. Two conditions matter before any of this becomes a bill. It applies to a taxable account: the same distribution inside a tax-advantaged account is not taxed when it lands. And it is a United States rule, since not every country pushes fund gains out to holders at all. If the distribution is reinvested, add it to your cost basis, because it has already been taxed once.

Does holding an investment for longer really change the tax?

In the United States it can change the rate rather than the amount. A gain realised inside the statutory holding period is short-term and is taxed at ordinary income rates, and one realised after it is long-term and meets a separate schedule that is generally lower. The line behaves as a step: crossing it moves the whole gain onto the other schedule, not only the part that accrued afterwards. Where the line sits, and the rates either side of it, are set by legislation and are revised, so check the current rule rather than a remembered number. Holding for longer also postpones the tax, which is a separate benefit and applies anywhere gains are taxed on disposal. Other countries handle the question differently, and some tax gains as ordinary income no matter how long they were held.

Keep reading

This page is educational material, not financial advice. The figures come from the formula shown and assume the inputs you enter hold for the whole term. Your own rate, fees, taxes and timing will differ, so treat the output as arithmetic to check a decision against, not as a recommendation.