Capital Gains Tax Calculator

Use our capital gains tax calculator to estimate your potential bill on investments sold for a profit in 2026.

Many, or all, of the products featured on this page are from our advertising partners who compensate us when you take certain actions on our website or click to take an action on their website. However, this does not influence our evaluations. Our opinions are our own. Here is a list of our partners and here's how we make money.

Profile photo of Sabrina Parys
Written by 
Editor & Content Strategist
Profile photo of Arielle O'Shea
Reviewed by 
Head of Content, Investing & Taxes
Profile photo of Arielle O'Shea
Edited by 
Head of Content, Investing & Taxes
Profile photo of Bella Avila
Co-written by 
Content Management Specialist
Profile photo of Tina Orem
Co-written by 
Editor & Content Strategist

When you sell investments for a profit, you may owe capital gains tax on the money you make. How much you pay is determined by how long you owned the asset before selling it, as well as your taxable income and filing status.

How to calculate capital gains tax


How you calculate capital gains depends on the length of time you owned the asset before selling it. Below, we'll break down how short-term and long-term calculations work — as well as how our calculator estimates taxes owed on a single asset sold for a profit.

How to calculate short-term capital gains tax

Short-term gains are taxed as ordinary income, which means they are subject to the same tax rates as regular income, such as that from your job. Those tax rates can range from 10% to 37%, depending on how much you make and your filing status.

How our calculator estimates short-term gains tax

In this scenario, let's assume the following:

  • Filing status: Single filer.

  • Short-term gain: $4,500.

  • Projected 2026 taxable income: $50,000.

  • Total taxable income, including gain: $54,500.

According to the 2026 tax rates for a single filer, tax on $54,500 of taxable income, of which $4,500 is a short-term gain, would be determined as follows:

Your estimated total tax, including that on your gain, would be $6,702 ($1,240 + $4,560 + $902). Of that sum, the tax directly tied to the capital gain, which fell in the 22% bracket, would be $990 ($4,500 x 22%).

AD
Life is messy.
Make a financial plan

NerdWallet Wealth Partners builds personalized financial plans and investment strategies, helping you control what you can and prepare for what you can’t.

Face, Happy, Head
BOOK A FINANCIAL ASSESSMENT

on NerdWallet Wealth Partners' website. For informational purposes only. NerdWallet Wealth Partners does not provide tax or legal advice.

How to calculate long-term capital gains

Long-term capital gains follow a different tax structure from short-term gains. Holding onto an asset for more than a year means your gains are exposed to more favorable tax rates — you may pay a combination of 0%, 15% and 20% on the gain, rather than ordinary income tax rates, which can reach 37%. Per the IRS, most people pay no more than 15% on capital gains

Internal Revenue Service. Topic no. 409, Capital Gains and Losses. Accessed Jan 1, 2026.
.

To assess which portions of your gain are subject to 0%, 15% or 20%, you'll need to review the tax brackets for long-term gains. These differ from ordinary income tax brackets. Your ordinary income plays a role in determining your taxable income for long-term capital gains calculations (it fills up the brackets first), even though that income isn't taxed at the long-term rate.

Tax rate

Single

Married filing jointly

Married filing separately

Head of household

0%

$0 to $49,450

$0 to $98,900

$0 to $49,450

$0 to $66,200

15%

$49,451 to $545,500

$98,901 to $613,700

$49,451 to $306,850

$66,201 to $579,600

20%

$545,501 or more

$613,701 or more

$306,851 or more

$579,601 or more

Short-term capital gains are taxed as ordinary income according to federal income tax brackets.

How our calculator estimates long-term gains tax

In this scenario, let's assume the following:

  • Filing status: Single filer.

  • Long-term gain: $15,000.

  • Projected 2026 taxable income: $50,000.

  • Total taxable income, including gain: $65,000.

In this case, your ordinary income fills up all of the 0% bracket and a small part of the 15% bracket. That ordinary income will be taxed according to regular tax rates, even though it's used here to determine how much tax you’ll pay on the capital gains portion of your income. Here, your capital gain then falls into the 15% bracket and will be taxed at that rate.

When it comes to determining your total tax, you'll need to review both regular ordinary income tax rates as well as the long-term capital gains tax rates. In this example scenario, the estimate for total taxes owed is $8,002 ($1,240 + $4,512 + $2,250), of which $2,250 ($15,000 x 15%) is related to the long-term gain.

Ordinary income


10%: $0 to $12,400 = $1,240.

12%: $12,401 to $50,400 = $4,512.

Capital gain


15%: $50,000 to $65,000 = $2,250.

Frequently asked questions

Our calculator is meant to provide a general estimate. It uses taxable income rather than gross income as a starting point for determining taxes owed. If you enter your gross salary or wages into the "taxable income" field, this may cause your taxes owed to look higher. For estimation purposes, be sure to account for any deductions first.

For example, let's say you're a single filer who will make $70,000 this year and contribute $5,000 to your 401(k). If you're taking the standard deduction and have no other deductions, your taxable income for purposes of using this calculator would be $50,000 ($70,000 - $15,000 - $5,000).

Capital gains tax calculations can be complicated. While it's good to have an understanding of how these numbers are figured, good tax software will do the math behind the scenes for you.

If you don't want to go the DIY route, finding a qualified tax preparer will help you avoid crunching the numbers yourself.

Key Terms


  • Long-term capital gain: This refers to assets that were owned for more than a year before their sale.

  • Short-term capital gain: This refers to assets that were sold within a year or less of their original purchase.

  • Taxable income: This refers to your gross income after you've subtracted your tax-deductible 401(k) and IRA contributions, your standard or itemized deductions, plus any other deductions you're entitled to.