Money basics

How Capital Gains Tax Works

A capital gain is the profit when you sell an investment for more than you paid. Learn the difference between short-term and long-term gains, and why the holding period matters.

By the Euphoria team · 2026-07-22 · 6 min read

The columned facade of the Internal Revenue Service building in Washington, D.C.
Photo: Carol M. Highsmith (Public domain)

When you sell an investment for more than you paid, the profit is called a capital gain, and it is generally taxable. This surprises people who assumed tax was something that happened only to paychecks.

The mechanics are more approachable than the word "capital" suggests, and one detail, how long you held the investment, does most of the work in determining what you owe.

This is general education rather than tax advice. Rules differ by country and change over time, and personal circumstances matter enormously.

Key Takeaways

Understanding gains and cost basis

Two terms carry most of the meaning.

Your cost basis is what you paid for the investment, including fees. Your capital gain is the sale price minus that basis.

Buy a share for $100, sell it later for $160, and your gain is $60. That $60 is the amount potentially subject to tax, not the full $160 you received. This trips people up constantly: you are taxed on the profit, not the proceeds.

If you sell for less than your basis, the difference is a capital loss, which is generally useful at tax time rather than simply wasted.

Crucially, a gain is usually only counted when you actually sell. An investment that has doubled but that you still hold has an unrealized gain, and unrealized gains are typically not taxed. Selling is the event that turns paper profit into a taxable one.

Short-term versus long-term

This is where the holding period earns its importance.

Most systems split gains into two buckets based on how long you owned the asset. The common dividing line is about one year.

The policy intent is straightforward: the system nudges toward holding rather than rapid trading.

A worked example

Suppose you buy $5,000 of a fund and later sell it for $7,000. Your gain is $2,000.

Imagine your ordinary income rate is 22 percent and the long-term rate that applies to you is 15 percent. The numbers here are illustrative, not your actual rates.

Four months of patience changed the outcome by $140 on an identical investment and an identical profit. That gap widens as the numbers grow.

This is emphatically not a reason to hold something you have decided to sell purely to cross a date. It is a reason to know where the date falls before you decide.

Losses, and why the net matters

Capital losses are not simply a bad outcome with no consolation. In many systems, losses offset gains, so what gets taxed is the net.

If you realize a $2,000 gain on one sale and a $1,200 loss on another in the same year, you are generally taxed on the $800 net rather than the full $2,000. Some systems allow a portion of unused losses to offset ordinary income or to carry into future years.

You are taxed on the profit, not the proceeds, and often on the net rather than each sale in isolation.

What to keep track of

The Bottom Line

Capital gains tax applies to profit, is generally triggered by selling, and depends heavily on how long you held the investment. Knowing those three facts covers most of what a beginner needs to make sense of a brokerage statement.

For anything with real money attached, a qualified tax professional who knows your situation is worth far more than a general guide.