Capital gains tax basics are worth learning before you make your first sale. The idea is simple. You pay tax on profit, not on the money you started with.

What a capital gain is

A capital gain is the profit you make when you sell an investment for more than you paid. Say you buy a share for $100 and sell it for $130. Your gain is $30.

If you sell for less than you paid, that is a capital loss. Losses matter too, and they can help you, as you will see below.

The amount you paid is called your cost basis. It includes the price of the shares and sometimes small fees. Your broker keeps track of this for you.

This is the most important part. A gain that has not been sold is called an unrealized gain. It is only on paper. You do not owe tax on it.

When you sell, the gain becomes realized. That is when the tax can apply. So if your fund goes up for ten years and you never sell, you owe no capital gains tax on that growth during those years.

This is one reason long term investing is tax friendly. You get to decide when to sell, and that decides when the tax shows up.

Short term vs long term

How long you held the investment matters a lot.

The difference can be big. Holding an investment just past the one year mark can lower your tax bill. That is not a reason to hold something you no longer believe in. But if you are close to the line, it is worth knowing.

The exact rates depend on your income and filing status, and they change over time. Check the current numbers with the IRS or a tax professional.

How losses can help

A loss is never fun. But the tax rules give you a small silver lining.

You can use capital losses to cancel out capital gains. If you made $2,000 on one sale and lost $500 on another, you are taxed on $1,500. If your losses are larger than your gains, you may be able to deduct a limited amount against other income and carry the rest forward to future years. Check the current limit.

There is one rule to know. The wash sale rule says you cannot claim a loss if you buy the same or a very similar investment within a short window before or after the sale. Your broker’s tax form can help you spot this.

Where the tax paperwork comes from

You do not have to keep a spreadsheet of every trade. Your broker handles most of it.

After the year ends, your broker sends Form 1099-B. It lists what you sold, what you paid, what you got, and whether the gain was short or long term. You or your tax software uses it to fill out your return.

Funds can also pass gains to you even if you did not sell. A mutual fund may sell holdings inside the fund and pay out a capital gain distribution. That can be taxed in a regular account. ETFs tend to do this less often.

For more terms like these, our glossary is a handy place to look.

Accounts that change the rules

Where you hold your investments matters.

In a regular taxable brokerage account, capital gains rules apply when you sell. In a traditional IRA or 401(k), you do not pay capital gains tax when you sell inside the account. You pay income tax when you withdraw. In a Roth IRA, qualified withdrawals can be tax free, so gains can grow without capital gains tax if you follow the rules.

This is a big reason many people use retirement accounts first. Contribution limits and rules change, so check the current ones. A good starting place for the whole picture is our Investing From Zero guide.

You do not need tricks. A few calm habits go a long way.

Hold for the long term when it fits your plan. Avoid selling just because the news is loud. Keep your trade records, even though your broker does too. Think about taxes before you sell a big winner, not after. And if you are unsure, ask a tax professional. A short chat can save a lot of stress.

Remember that tax should never be the only reason to act. A good investment you sell too early or too late because of tax is still a mistake. Balance the two.

A quick example may help. Say you buy shares for $1,000 and sell them for $1,400 after holding them for two years. Your gain is $400, and it counts as long term. You owe tax on the $400 at the long term rate, not on the whole $1,400. Now say you had sold after six months instead. The same $400 would be taxed at your regular income rate, which is often higher.

One more thing to know is that you can choose which shares to sell if you bought at different times. Brokers often offer options for this, like selling the oldest shares first or picking specific lots. The choice can change your tax bill. It is worth a look at your broker’s settings before you sell.

Key takeaways

Taxes are part of investing, not a reason to stay away. Now that you know the basics, you can make choices with your eyes open. Take it one step at a time, and keep learning. You are already ahead of where you were this morning.

Keep reading

This is general education for US readers, not personal investment advice. Investing involves risk, including loss of money.