Capital Gains Tax: How It Works, Rates and Calculator

Capital gains are the profits you get when you sell an asset. They can be subject to either short-term or long-term tax rates, depending on how long you owned the asset.

Updated Aug 16, 2024 · 5 min read Written by Tina Orem Assistant Assigning Editor

Tina Orem
Assistant Assigning Editor | Taxes, small business, Social Security and estate planning, home services

Tina Orem is an editor at NerdWallet. Prior to becoming an editor, she covered small business and taxes at NerdWallet. She has been a financial writer and editor for over 15 years, and she has a degree in finance, as well as a master's degree in journalism and a Master of Business Administration. Previously, she was a financial analyst and director of finance for several public and private companies. Tina's work has appeared in a variety of local and national media outlets.

Reviewed by Lei Han Professor of accounting

Lei Han
Professor of accounting

Lei Han, Ph.D., is an associate professor of accounting at Niagara University in Western New York and a New York state-licensed CPA. She obtained her Ph.D. in accounting with a minor in finance from the University of Texas at Arlington. Her teaching expertise is advanced accounting and governmental and nonprofit accounting. She is a member of the American Accounting Association and New York State Society of Certified Public Accountants.

At NerdWallet, our content goes through a rigorous editorial review process. We have such confidence in our accurate and useful content that we let outside experts inspect our work.

Co-written by Sabrina Parys Assistant Assigning Editor

Sabrina Parys
Assistant Assigning Editor | Taxes, Investing

Sabrina Parys is an assistant assigning editor on the taxes and investing team at NerdWallet, where she manages and writes content on personal income taxes. Her previous experience includes five years as a copy editor and associate editor in academic and educational publishing. She is based in Brooklyn, New York.

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.

Table of Contents

MORE LIKE THIS Tax brackets and rates Taxes Investing

Table of Contents

MORE LIKE THIS Tax brackets and rates Taxes Investing

If you own investments or regularly sell assets you own, it's important to understand the potential tax implications

What is a capital gains tax?

Capital gains taxes are the taxes you pay on profits made from the sale of assets, such as stocks or real estate. How much you pay depends on what you sold, how long you owned it before selling, your taxable income and your filing status.

Holding onto an asset for more than a year before selling generally results in a more favorable tax rate of 0% to 20%, whereas assets sold within a year or less of ownership are subject to regular income tax rates, ranging from 10% to 37%.

Capital gains taxes apply to assets that are "realized," or sold. This means that the returns on stocks, bonds or other investments purchased through and then held within a brokerage are considered unrealized and not subject to capital gains tax.

One important caveat is investments that produce dividends. Even when the underlying stock remains unsold, income you receive from certain dividends may be considered a capital gain .

Assets held within tax-advantaged accounts — such as 401(ks) or IRAs — aren't subject to capital gains taxes while they remain in the account. Instead, you may pay regular income taxes when it comes time to make a qualified withdrawal, depending on what type of account it is.

» Selling a home? Taxes on the sale of a home can work differently.

What are capital gains?

Most items people own are considered capital assets. This can include investments, such as stocks, bonds, cryptocurrency or real estate, as well as personal and tangible items, such as cars or boats.

When you sell a capital asset for a higher price than its original value, the money you make on that sale is called a capital gain. And when you sell an asset for less than its original value, the money you lose is known as a capital loss.

The difference between your capital gains and your capital losses is your net profit. For example, if you sold a stock for a $10,000 profit this year and sold another at a $4,000 loss, your net capital gain is $6,000.

» Having trouble deciding whether to sell? A qualified financial advisor can help.

Simple tax filing with a $50 flat fee for every scenario

With NerdWallet Taxes powered by Column Tax, registered NerdWallet members pay one fee, regardless of your tax situation. Plus, you'll get free support from tax experts. Sign up for access today.

Register Now

for a NerdWallet account

Hassle-free tax filing* is $50 for all tax situations — no hidden costs or fees.

Maximum refund guaranteed

Get every dollar you deserve* when you file with this tax product, powered by Column Tax. File up to 2x faster than traditional options.* Get your refund, and get on with your life.

*guaranteed by Column Tax

How do capital gains taxes work?

Capital gains can be subject to either short-term tax rates or long-term tax rates. Short-term capital gains are treated as ordinary income and taxed according to ordinary income tax brackets. Long-term capital gains are taxed at 0%, 15%, or 20%.

High-earning individuals may also need to account for the net investment income tax (NIIT), an additional 3.8% tax that can be triggered if your income exceeds a certain limit.

Long-term capital gains on so-called “collectible assets” can be taxed at a maximum of 28%. This includes items such as coins, precious metals, antiques and fine art. Short-term gains on such assets are taxed at the ordinary income tax rate [0]

What is long-term capital gains tax?

Profits from the sale of an asset held for more than a year are subject to long-term capital gains tax. The rates are 0%, 15% or 20%, depending on taxable income and filing status. Per the IRS, most people pay no more than 15%

What is short-term capital gains tax?

Short-term capital gains tax is a tax on profits from the sale of an asset held for one year or less. Short-term capital gains are taxed according to your ordinary income tax bracket: 10%, 12%, 22%, 24%, 32%, 35% or 37%.

» Ready to crunch the numbers? Try our capital gains tax calculator .

Capital gains tax rate 2024

In 2024, single filers with a taxable income of $47,025 or less, joint filers with a taxable income of $94,050 or less, and heads of households with a taxable income of $63,000 or less pay 0% on qualified realized long-term gains.

If your taxable income exceeds those amounts, you may be subject to 15% and 20% tax rates. Short-term capital gains held for a year or less are taxed at regular income tax rates.

The following rates and brackets apply to long-term capital gains sold in 2024 (reported on taxes filed in 2025).

Married filing jointly

Married filing separately

Head of household

$47,026 to $518,900

$94,051 to $583,750

$47,026 to $291,850

$63,001 to $551,350

Capital gains tax rate 2023

If you still need to file your 2023 tax return, see the long-term capital gains tax rates that apply to assets sold for a profit in 2023, which are reported on tax returns that were due April 15, 2024, or Oct. 15, 2024, with an extension.

Married filing jointly

Married filing separately

Head of household

$44,626 to $492,300

$89,251 to $553,850

$44,626 to $276,900

$59,751 to $523,050

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

Capital gains tax calculator

Use this capital gains calculator to estimate your taxes on assets sold in 2023 (taxes filed in 2024). This calculator is meant for general estimating purposes and does not take into account factors that may affect your total tax picture, such as standard or itemized deductions.

How to avoid or reduce capital gains taxes

1. Hold on

Whenever possible, hold an asset for longer than a year so you can qualify for the long-term capital gains tax rate, because it's significantly lower than the short-term capital gains rate for most assets. Our capital gains tax calculator shows how much that could save.

» Dive deeper: Read more about taxes on stocks , and how to pay less.

2. Use tax-advantaged accounts

These include 401(k) plans , individual retirement accounts and 529 college savings accounts, in which the investments grow tax-free or tax-deferred. That means you don’t have to pay capital gains tax if you sell investments within these accounts. Roth IRAs and 529 accounts , in particular, have big tax advantages. If you follow the account rules, you can withdraw money from those accounts tax-free. With traditional IRAs and 401(k)s, your money grows tax-deferred, then you pay taxes when you take distributions in retirement.

» Learn more about different retirement accounts .

Simple tax filing with a $50 flat fee for every scenario

With NerdWallet Taxes powered by Column Tax, registered NerdWallet members pay one fee, regardless of your tax situation. Plus, you'll get free support from tax experts. Sign up for access today.

Register Now

for a NerdWallet account

3. Rebalance with dividends

Rather than reinvest dividends in the investment that paid them, rebalance by putting that money into your underperforming investments. Typically, you'd rebalance by selling securities that are doing well and putting that money into those that are underperforming. But using dividends to invest in underperforming assets will allow you to avoid selling strong performers — and thus avoid the capital gains that would come from that sale.

» Learn more about the dividend tax rate and how it works.

4. Use the home sales exclusion

If you sold a house the previous year, you may be able to exclude a portion of the gains from that sale on your taxes. To qualify, you must have owned your home and used it as your main residence for at least two years in the five-year period before you sell it. You also must not have excluded another home from capital gains in the two-year period before the home sale. If you meet those rules, you can exclude up to $250,000 in gains from a home sale if you’re single, and up to $500,000 if you’re married filing jointly.

5. Look into tax-loss harvesting

The IRS taxes your net capital gain, which is simply your total long- or short-term capital gains (investments sold for a profit) minus the corresponding long- or short-term total capital losses (investments sold at a loss). The strategic practice of selling off specific assets at a loss to offset gains is called tax-loss harvesting . This strategy has many rules and isn't right for everyone, but it can help to reduce your taxes by lowering the amount of your taxable gains.

If your net capital loss exceeds your net capital gains, you can also offset your ordinary income by up to $3,000 ($1,500 for those married filing separately). Any additional losses can be carried forward to future years to offset capital gains or up to $3,000 of ordinary income per year.

6. Consider a robo-advisor

Robo-advisors manage your investments for you automatically, and they often employ smart tax strategies, including tax-loss harvesting, as a part of the service. » Ready to get started? See our picks for best robo-advisors .

About the authors

You’re following Tina Orem
Visit your My NerdWallet Settings page to see all the writers you're following.

Follow for more nerdy know-how Keep up with your favorite financial topics on NerdWallet.

Tina Orem is an editor at NerdWallet. Before becoming an editor, she was NerdWallet's authority on taxes and small business. Her work has appeared in a variety of local and national outlets. See full bio.

You’re following Sabrina Parys
Visit your My NerdWallet Settings page to see all the writers you're following.

Sabrina Parys is a content management specialist on the taxes and investing team at NerdWallet, where she manages and writes content on personal income taxes. Her work has appeared in The Associated Press, The Washington Post and Yahoo Finance. See full bio.

On a similar note.

Finance Smarter Credit Cards Financial Planning Financial News Small Business

Download the app

QR code for downloading the app

Disclaimer: NerdWallet strives to keep its information accurate and up to date. This information may be different than what you see when you visit a financial institution, service provider or specific product's site. All financial products, shopping products and services are presented without warranty. When evaluating offers, please review the financial institution's Terms and Conditions. Pre-qualified offers are not binding. If you find discrepancies with your credit score or information from your credit report, please contact TransUnion® directly.

NerdUp by NerdWallet credit card: NerdWallet is not a bank. Bank services provided by Evolve Bank & Trust, member FDIC. The NerdUp by NerdWallet Credit Card is issued by Evolve Bank & Trust pursuant to a license from MasterCard International Inc.

Impact on your credit may vary, as credit scores are independently determined by credit bureaus based on a number of factors including the financial decisions you make with other financial services organizations.

NerdWallet Compare, Inc. NMLS ID# 1617539

California: California Finance Lender loans arranged pursuant to Department of Financial Protection and Innovation Finance Lenders License #60DBO-74812

Insurance Services offered through NerdWallet Insurance Services, Inc. (CA resident license no.OK92033) Insurance Licenses

NerdWallet™ | 55 Hawthorne St. - 10th Floor, San Francisco, CA 94105