For educational purposes only — not investment advice
Back to tutorials
Taxes in Investing
Capital Gains Tax — how it affects investing and how to optimize
8 min read💰 Level: intermediate
Contents
What is capital gains tax?

Capital gains tax is a levy on profits from the sale of assets such as stocks, ETFs, bonds, and sometimes real estate. The rate and rules vary by country. For example: in the United States, long‑term gains (assets held over one year) are taxed at 0%, 15%, or 20% depending on income, while short‑term gains are taxed as ordinary income. Germany applies a flat 25% plus a solidarity surcharge (around 26.4% total). France uses a flat 30% rate (prélèvement forfaitaire unique) on both gains and dividends.

A key principle: tax is usually due only when you sell and realize the gain. Until then, your profit remains unrealized and tax is deferred. This allows long‑term investors to keep their full capital working and delay the tax payment – often for decades.

Capital gains tax is triggered only upon sale. Until then, your profit is unrealized – no tax is due. This is a crucial insight for long‑term investing: you can let your money compound tax‑free for years.
When does the tax liability arise?

In most countries, the tax is triggered by a sale. In Germany, the flat 25% + solidarity surcharge is withheld automatically by the broker. In France, the 30% flat tax is also often withheld at source. In the US, you report gains on Schedule D and pay the appropriate rate depending on your holding period and income bracket. The exact timing and method vary, but the rule is consistent: selling generates a taxable event.

1
Sale at a profit
When you sell an ETF, stock, or bond at a price higher than your purchase price, a taxable gain is realized.
2
Receiving dividends or interest
Dividends and interest payments are usually taxed when paid, even if reinvested. In many countries, withholding tax is applied at source (e.g., 15–30% depending on tax treaties).
3
Annual declaration
You report the gains in your annual tax return. Brokers often provide pre‑filled forms or withhold estimated tax, but final settlement is usually done by the investor.
How does tax affect your returns?

Each time you sell at a profit, you immediately lose a portion of your gains to tax. The earlier you pay, the less capital remains to compound. Over long horizons, this can erode a significant part of your final wealth.

$100 000
Initial capital
8%
Avg annual return
-19%
Tax on gains (when sold)

Example: You invest $100,000 at 8% annual return for 20 years. Without selling, you end up with ~$466,000. After paying 19% tax on the gain ($366,000), you keep ~$397,000. If you sell every year and pay tax each time, the final amount drops to ~$293,000. That’s a loss of over $100,000 – the price of frequent profit taking.

Key principle: defer tax as long as possible. Do not sell without a reason. Let compounding work on the full amount, and pay tax only when you finally need the money.
How to invest to avoid overpaying tax?
1. Hold long‑term – avoid frequent rebalancing

Every sale with a profit triggers a tax liability. If you rebalance monthly, you pay tax many times, eroding the power of compounding. Instead, rebalance infrequently – ideally once a year or, even better, use new contributions to bring the portfolio back to target weights without selling.

2. Use tax‑advantaged accounts (IRA/401k in the US, etc.)

In the US, retirement accounts like Traditional IRA/401(k) offer tax‑deferred growth (tax paid upon withdrawal), while Roth IRA/401(k) provide tax‑free growth (contributions are after‑tax, but withdrawals are tax‑free). Germany offers Riester and Rürup pensions with specific tax advantages. France has the Plan Épargne Retraite (PER). Using such vehicles is the most powerful way to legally avoid or defer capital gains tax.

3. Avoid unnecessary dividends – pick accumulating ETFs

Dividends are usually taxed when paid, even if reinvested. In many countries, they are subject to withholding tax. Therefore, for long‑term investing, choose accumulating ETFs (ACC) – they reinvest dividends internally without creating a taxable event for you.

4. Consider tax‑loss harvesting

If you have positions with unrealized losses, you can sell them to realize a loss, which offsets gains elsewhere and reduces your tax bill. In the US, up to $3,000 of capital losses can be deducted against ordinary income each year, with excess carried forward. In Germany and France, losses can be offset only against capital gains. Use this strategy carefully to avoid wash‑sale rules.

Optimal strategy
Buy & hold for 20–30 years
Accumulating ETFs (ACC)
Tax‑advantaged retirement accounts (IRA/401k, etc.)
Rebalance through new contributions only
Tax paid only once – at the end
Suboptimal strategy
Frequent buying and selling (day trading)
Distributing ETFs (DIST)
No retirement accounts
Monthly rebalancing via selling
Tax paid every year – lost compounding
Summary: how to minimize the impact of capital gains tax
1
Do not sell unnecessarily
Tax is only due upon sale. The less you sell, the more capital stays invested and compounding.
2
Use retirement accounts (IKE/IKZE, IRA, 401k)
These are the only ways to legally avoid capital gains tax during the accumulation phase.
3
Choose accumulating ETFs (ACC)
Dividends are reinvested internally without triggering tax, which boosts compounding.
4
Rebalance through new contributions
Instead of selling winners, buy more of the underweight assets – you avoid triggering tax.
Remember: capital gains tax can take a significant bite out of your returns. The difference between constant trading and a buy‑and‑hold strategy can amount to tens of percent of your final capital. In the Investiq calculator, you can enable the capital gains tax option and see the effect on your own portfolio.