When you sell any asset for a capital gain, you’ll usually be on the hook for capital gains taxes. The timing with which you sell your investments has a significant impact on how much you’ll pay in taxes. The IRS rewards gains from investments you’ve held for a longer period. Meanwhile, you’ll pay a higher rate when you hold your assets for a shorter period.
The IRS updates the capital gains tax brackets each year to account for inflation. If you expect to claim any investment gains on your next tax return, it’s important to understand which tax bracket you’ll fall into and how to calculate your tax liability.
In this article, we’ll walk you through the basics of how capital gains taxes work, the current rates and brackets, special capital gains tax rules, and more.
How Capital Gains Taxes Work
When you sell an asset for more than you paid for it, you have what's defined as a "capital gain." The amount of gain subject to the capital gains tax is the difference between the sale price and what you originally paid for the asset (which is known as the "cost basis"). You'll pay the capital gains tax on this difference.
For example, let's say you bought stock five years ago for $100. Today, that stock has appreciated to $250, and you decide to sell it. Your cost basis for the sale is $100, and your capital gain is $150. The capital gains tax would be levied against the $150 portion of your profit (check out the next section to determine which capital gains tax rate you'd use).
As a note, the capital gains tax is separate from your regular income tax. Your regular income tax is calculated based on your earned income like wages, salaries, and other forms of ordinary income. Capital gains (like the sale of a stock or business asset) don't typically add to your earned income for the purposes of calculating your regular income tax.
Long-term vs. short-term capital gains
Capital gains taxes are divided into two different buckets: short-term capital gains and long-term capital gains. Each bucket has its own corresponding tax rate. Figuring out which capital gains tax rate to apply is straightforward:
- Short-term capital gains rate: For assets you've held for less than one year, you'll apply your ordinary income tax rate to the capital gain.
- Long-term capital gains rate: For assets you've held for more than a year, you benefit from a lower tax rate. Depending on your overall income, your capital gains tax rate will either be 0%, 15%, or 20%.
2025 Capital Gains Tax Rates & Brackets
Long-term capital gains are taxed at more favorable rates of either 0%, 15%, or 20%, depending on your income. The table below breaks down the incomes for each of the 2025 capital gains tax brackets.
Tax rate | Single | Married filing jointly | Married filing separately | Head of household |
---|---|---|---|---|
0% | $0 to $48,350 | $0 to $96,700 | $0 to $48,350 | $0 to $64,750 |
15% | $48,351 to $533,400 | $96,701 to $600,050 | $48,351 to $300,000 | $64,751 to $566,700 |
20% | $533,401 or more | $600,051 or more | $300,001 or more | $566,701 or more |
Short-term capital gains are taxed at your ordinary income tax rates. These rates range from 10% to 37%, and the amount you’ll pay depends on your overall taxable income, including both capital gains and other income.
How to Calculate Capital Gains Tax (3 Steps)
Step 1: Figure out your cost basis
Your cost basis is the amount you originally paid for an asset. For example, if you bought shares of stock for $100 per share and sold them for $200 per share, your cost basis is $100 per share. Your cost basis also includes expenses related to the asset, including commissions and fees, capital improvements, prior depreciation, return of capital, and DRIP reinvestments.
The IRS offers three different methods to determine the cost basis of identical assets purchased at different times:
- Specific share identification: Using this method, you can identify specific shares to sell and calculate your capital gains taxes accordingly. This method only works if you’ve kept careful records and can prove your basis in the specific shares you want to sell.
- First in, first out (FIFO): This more common method assumes that you’re always selling the oldest shares in your portfolio, giving you the most favorable tax rate possible.
- Average basis: Rather than identifying the cost basis of specific assets, you can use the average basis of all identical assets to calculate your capital gains tax liability. For example, if you purchased five shares at $5 per share and five at $10 per share, your average basis is $7.50.
Specific share identification can help reduce your tax liability because you can choose to sell the stocks that will result in the lowest capital gain and, therefore, the least amount of capital gains taxes.
Inherited property enjoys a stepped-up basis. The cost basis of any asset you inherited is based on either its fair market value on the date of the decedent’s death or on the date of a later alternative valuation date, if the estate qualifies for such a valuation.
Step 2: Compute your gain or loss and holding period
As we mentioned, you’ll pay different tax rates depending on how long you held the asset. Assets you held for more than one year are eligible for long-term capital gains tax treatment, while assets you held for one year or less are subject to short-term capital gains tax treatment.
Calculating the holding period on an asset you purchased is usually simple, but it’s a bit more complicated when it’s an asset you either received as a gift or inherited from a loved one.
In the case of gifted assets, your holding period is the same as that of whoever you received the gift from. For example, if the gift giver bought the asset eight months ago, your holding period began eight months ago. Inherited property, on the other hand, is automatically treated as if you’ve owned it for more than one year, according to the IRS.
Step 3: Apply the correct rate and any surtaxes
Once you’ve identified these two key pieces of information (your cost basis and holding period), you can easily run the numbers to find how much you’ll owe in capital gains taxes. You can also plug your numbers into an online calculator that can calculate your capital gains taxes for you.
Depending on your household income, you may also be subject to a Net Investment Income Tax (NIIT), which applies to net investment income for high-income individuals, estates, and trusts. The NIIT rate of 3.8% applies at the following thresholds:
Filing status | Threshold amount |
---|---|
Single | $200,000 |
Married filing jointly | $250,000 |
Married filing separately | $125,000 |
Head of household | $200,000 |
NIIT check (3.8%) thresholds and how to compute the lesser-of test (NII vs MAGI over threshold). (IRS)
Quick Examples (2025)
Example A: Selling stocks or ETFs
Let’s say you own 1,000 shares of a company’s stock that you’ve purchased over the past decade at prices ranging from $10 to $25 per share. Today, the stock is worth $40 per share.
Suppose you decide to sell 250 of your shares for a total price of $10,000. If you use the FIFO method for determining cost basis and holding period, you’re guaranteed the more favorable long-term capital gains tax rate. But you’d also sell your lowest-price shares. Assuming those 250 shares were purchased for $10 per share, you would have a taxable gain of $7,500.
However, let’s say you purchased 250 of those shares two years ago for $20 per share. If you have the records for those purchases, you could use the specific share identification method to sell those specific shares instead.
They’re still eligible for the long-term capital gains tax treatment, but would reduce your capital gain from $7,500 to $5,000. If you’re in the 15% capital gains tax bracket, you’re saving yourself several hundred dollars in capital gains taxes.
Example B: Selling a rental property
Capital gains taxes don’t just apply to stocks and other financial assets. They also apply to real assets like homes. Let’s run through an example of how capital gains taxes might apply when you sell a rental property.
Suppose you bought the property for $300,000 and have claimed $80,000 in depreciation, meaning you have an adjusted basis of $220,000. You’re able to sell the property for $500,000.
By subtracting your adjusted basis from the sale price, you’d find you have a gain of $280,000. $80,000 of this is your unrecaptured gain, which is taxed at a maximum rate of 25%. The remaining $200,000 of your gain is taxed as a long-term capital gain. Let’s assume you fall into the 15% tax bracket.
The 25% tax on your recaptured gain and the 15% tax on the rest of your gain amounts to $50,000 in long-term capital gains taxes.
If you met the income threshold for the NIIT, you would also pay an additional 3.8%, or $10,640, resulting in a total tax bill of $60,640.
Example C: Mutual fund with DRIP
When you buy mutual funds through a dividend reinvestment plan (DRIP), the amount of dividend income you invest in the plan is added to your cost basis, ultimately reducing your tax liability when you sell.
For example, let’s say you buy 100 shares of a mutual fund at $20 each, for a total purchase price of $2,000. In the following two years, you reinvest your dividends to purchase 10 additional shares. In the first year, you pay $25 per share for your shares, and in the second year, you pay $30 per share. Your cost basis, which started at $2,000, is now $2,550.
Fast forward a couple of years, and you sell 50 of your shares for $40 per share, for a total price of $2,000.
If you use the average cost method to determine your cost basis, you would divide your total cost basis ($2,550) by the number of shares you own (120). In this case, your average cost basis is $21.25. When you sell 50 shares for $40 per share, you have a gain per share of $18.75, and a total gain of $937.50.
If you choose the average share identification method, you can choose the shares with the highest cost basis. In this case, you would start by selling the 20 shares you purchased with your reinvested dividends, which cost $25 and $30. You would then sell 30 shares at their original price of $20.
You would subtract your cost basis of $1,150 ($250 and $300 for the DRIP shares and $600 for the original shares) from the sale price of $2,000 to find a taxable gain of $850, which is lower than your gain using the average cost method.
Special Rules That Change Your Tax
There are a few special IRS rules that can either increase or decrease the amount you’ll owe in capital gains taxes.
Home sale exclusion
The IRS home sale tax exclusion allows you to exclude up to $250,000 (or $500,000 for married couples) from your capital gain when you sell your primary home. This exclusion can significantly reduce the amount you’ll owe in capital gains taxes.
You’re eligible for the home sale exclusion if you’ve owned and lived in your home for at least two of the five years leading up to its sale (though they don’t have to be the same two-year periods).
It’s also possible to qualify for a partial exclusion of gain if you sold your home due to a job change, health-related event, or an unforeseeable event.
Collectibles and section 1202 qualified small business stock
Section 1202 qualified small business stock and collectibles, including coins or art, are subject to a maximum long-term capital gains tax rate of 28%. If your ordinary income tax rate is lower than 28%, you’ll pay that rate instead, according to Tax Advisor. Short-term capital gains are still taxed as ordinary income.
1031 exchanges
Section 1031 creates a capital gains tax exception where you can defer your taxes if you sell a property and reinvest your gains into a similar property in a qualifying like-kind exchange. However, this doesn’t eliminate capital gains taxes forever. It simply delays them until you sell the second property. When that happens, you’ll pay capital gains taxes on your deferred gain and any new gains.
Wash sale rule
The wash sale rule prevents investors from claiming a capital loss for tax purposes if they buy a "substantially identical" investment within 30 days of the sale. This is to stop investors from tax-loss harvesting (described above) with no risk.
For instance, if you own a share of a particular total market index fund, you can't sell it for a loss and harvest the tax benefits if you immediately repurchase a different total market index fund. To harvest the loss in this case, you'd have to wait 30 days before purchasing.
How to Report Capital Gains on Your Tax Return
If you had any capital gains in the past tax year, you’ll have to report them on your federal income tax return. Here are the tax forms you’ll need:
- Broker 1099-B: If you had any capital gains, your broker will file Form 1099-B on your behalf and will send you a copy. You can use this information to report your taxable gains.
- Form 8949: You’ll report each individual sale on this form. Separate short-term and long-term gains for the most accurate reporting. You may need to fill out more than one Form 8949, depending on the type of gains you’re claiming.
- Schedule D: On this form, summarize the total short-term and long-term gains from Form 8949.
- Form 1040: This form is the annual income tax return form. You’ll file this form and attach Schedule D, and add your total capital gains or losses from Schedule D.
If you aren’t sure how to report your capital gains on your tax return, it’s best to consult a tax professional to ensure you file and report everything correctly.
Planning Moves to Reduce Taxes
While capital gains taxes are usually unavoidable, there are ways to reduce your capital gains tax liability.
Timing sales
Strategic timing of your asset sales can also significantly impact your tax bill. If you've held an asset for under one year, waiting until a full year has elapsed will allow you to access the favorable long-term capital gains tax rates instead of the higher short-term rates.
Additionally, if you can time the sale during a year in which your income is lower, you could avoid capital gains taxes entirely.
Tax-loss and tax-gain harvesting
Tax-loss harvesting is a strategy that involves selling underperforming investments to offset gains in other assets. By realizing losses simultaneously with gains, investors can effectively neutralize their gains and potentially reduce the amount they owe in capital gains taxes.
Note: If you sell off a particular asset to harvest the loss, you can't replace it with a "substantially identical" asset within 30 days of the sale. See the section about the wash sale rule above to learn more.
Charitable gifting of appreciated securities
Another strategy to reduce your capital gains tax is to gift or donate the appreciated assets to family members in lower tax brackets or to charitable organizations. Doing so requires you to understand the annual gift tax exclusion and the lifetime gift tax exclusion. For 2025, the annual gift tax exclusion allows you to gift $19,000 in assets to each other individual before it starts counting against your lifetime exclusion. The current lifetime exclusion is $13.99 million.
When gifting to a family member, the recipient assumes the asset's original cost basis, potentially resulting in less tax liability if they're in a lower tax bracket than you. When donating to charity, you can typically deduct the market value of the asset at the time of the donation from your taxable income, which reduces your overall tax liability.
Estimated taxes after a big sale
If you have a large capital gain and expect a big tax bill at the end of the year, the IRS recommends making quarterly estimated tax payments to avoid a penalty. The IRS requires estimated tax payments if you expect to owe at least $1,000 in taxes at the end of the year, after subtracting tax credits, or if you expect your withholding and refundable credits to be smaller than the lesser of:
- 90% of the tax on your current year’s tax return
- 100% of the tax shown on your last year’s tax return
Frequently Asked Questions (FAQs) About Capital Gains
Q. How do I know if my gain is long-term?
Your gain is long-term if you owned the asset in question for more than one year by the time you sell it. If you inherited the asset, your gain is automatically considered long-term.
Q. Do capital gains count toward MAGI for NIIT?
Yes, capital gains count toward your MAGI (short for modified adjusted gross income) for the purpose of determining whether you owe Net Investment Income Tax (NIIT). Your NIIT applies to the lesser of your net investment income or your MAGI.
Q. What if my brokerage reports the wrong basis?
If your brokerage firm reports the wrong basis on an asset, you can use Form 8949 to report the correct basis. Make sure you have accurate and thorough financial records, because you may have to prove that your numbers are correct.
Q. How are depreciation and §1250 handled on real estate?
When you sell a piece of real estate, you’ll have to recapture any depreciation you’ve deducted over the years. Unrecaptured gains are taxed at a maximum tax rate of 25%.
Q. Do I pay state capital gains taxes?
The majority of states tax capital gains as ordinary income. However, a handful of states – Arizona, Arkansas, Hawaii, Minnesota, Montana, New Mexico, North Dakota, South Carolina, Washington, and Wisconsin – have special capital gains tax rates, according to the Tax Foundation.
Tools & Next Steps
If you need help navigating the waters of long-term capital gains, consider using an online capital gains tax calculator that can run the numbers yourself. If you’d rather leave it in the hands of an specialist, consider consulting a tax professional. Meet with a Wealth Enhancement advisor today for help planning and calculating your capital gains taxes. We offer complimentary, no-obligation meetings to help you learn more.
Sources & Further Reading
- IRS. “Topic no. 409, Capital gains and losses.”
- IRS. “Revenue Procedure 2024-40.”
- IRS. “Publication 550 (2024), Investment Income and Expenses.”
- IRS. “Mutual funds (costs, distributions, etc.).”
- IRS. “Topic no. 701, Sale of your home.”
- IRS. “Publication 523 (2024), Selling Your Home.”
- IRS. “Like-Kind Exchanges Under IRC Section 1031.”
- IRS. “Large gains, lump sum distributions, etc.”
- Tax Foundation. “ State Tax Rates on Long-Term Capital Gains, 2024
Content in this material is for general information only and not intended to provide specific advice or recommendations for any individual.
Current as of 09/23/2025. Subject to legislative changes and not intended to be legal or tax advice. Consult a qualified tax advisor regarding specific circumstances. Accuracy is not guaranteed.
#2025-9327