I hope you enjoy reading this blog post.

If you need help with your retirement planning, click here to see if we're a fit.

  • Mark Fonville, CFP®

How Capital Gains Tax Is Calculated

How Capital Gains Tax is Calculated

If you have investments outside of tax-advantaged retirement accounts (401k, IRA, etc.), it’s critical to consider how the gains on those investments are taxed.

But, understanding how capital gains tax is calculated isn't always straightforward.

The tax rules aren’t as simple as a Roth or tax-deferred retirement account, where you only have to pay tax on the front end or the back end.

Gains earned along the way are potentially subject to capital gains tax, which is different from ordinary income tax. Understanding the nature of capital gains tax—what it is, how it affects you, and how it is calculated —could help you plan a more comprehensive investment strategy.

Taxes are critical year-round, but there are particular rules you should consider before year-end.

Download our free tax cheat sheet for important tax numbers every investor should know.

What impacts capital gains taxes, and how do you calculate your rate before tax time?

Here’s what you need to know about how capital gains tax is calculated by the IRS.

What Is Capital Gains Tax? Understanding Short and Long Term

First, it is essential to understand what a capital asset is before calculating its tax burden.

Capital gains can apply to investments such as stocks, bonds, real estate, cars, boats, cryptocurrency, collectibles, home sale, and other tangible items. If an investment is worth more than your cost basis (typically, your basis is what you paid for it) then, you have a capital gain in that investment. If an investment is worth less than your cost basis, you incur a capital loss.

While you still own that investment, the gain is said to be unrealized. Presently, you do not incur a tax liability on unrealized capital gains.

For example, if you paid $100 for a stock that is now worth $125. You have an unrealized gain of $25.

However, if you sell the investment, the gain transitions from unrealized to realized; realized capital gains drive capital gains taxes. Your tax bill is based on the realized gain and not simply the amount of your investment. So, if your purchase price was $100 and the sale price was $125, you’d have to pay capital gains tax on $25.

The length of time you hold the investment before you realize the gain makes a significant difference in your tax bill, too. Your gain can be taxed as either a long-term or short-term capital gain.

Tax rates on long-term capital gains for 2022
  • Long-term capital gains tax: Favorable long-term capital gains tax rates apply only to profits from the sale of assets held for more than a year. The rates are 0%, 15%, or 20%, depending on the taxpayer's taxable income and filing status (single, married filing jointly, head of household, etc.) for that year.

  • Short-term capital gains tax: Short-term capital gains tax applies to assets held for a year or less and are taxed as ordinary income. For many taxpayers, that is a higher tax rate than the capital gains rate.

Here are the 2022 Federal tax brackets that apply to short-term capital gains in 2022:

2022 federal tax brackets for short-term capital gains.

But, a lot of people don't realize that capital gains can trigger additional taxes on top of long-term and short-term capital gains tax. You'll need to understand two more tax triggers to really understand how to calculate capital gains tax on your investments.

For those with significant capital gains (and high-income families), you may also be subject to the 3.8% net investment income tax and a very sneaky tax called the income-related monthly adjustment amount or IRMAA. The IRMAA tax is an added cost to Medicare premiums in retirement and many retirees miss this entirely before it's too late.

Both the net investment income tax and IRMAA can potentially cost you tens of thousands of dollars in additional taxes if you aren't careful with how you calculate capital gains taxes.

Ultimately, understanding the difference between short and long-term capital gains, and planning accordingly, can help you pay less in taxes. This can go a long way toward increasing the after-tax return on your investments.

How to Calculate Your Capital Gains Taxes

Now that you understand what a capital gain is and the difference between long and short-term capital gains, let’s look at how the capital gains tax is calculated. The key here is to understand that your tax liability rests on your net capital gain.

First, list out all the money you made by selling investments (like stocks, bonds, cars, other tangible items).

If you held any assets for a year or less, mark those up to short-term capital gains and know they will be taxed at your standard income tax rate. If you held any assets for more than a year, they would be subject to taxation at the lower long-term capital gains rate.

However, you won’t necessarily pay capital gain taxes on that entire amount. The next thing to do is tally up all of your realized investment losses for the year. That amount is taken out of your realized capital gains, and the result is the final amount that will be taxed.

For a simple example, assume you realized a $10,000 gain by selling a stock but lost $3,000 selling another; the difference would be $7,000.