Long-Term Capital Gains Tax Calculator
Calculate long-term capital gains tax at 0%, 15%, or 20% federal rates. See federal and state tax on assets held over one year. Free tool.
Long-Term Capital Gains Tax Calculator
Background.
Long-term capital gains are profits from selling assets held for more than one year, and they receive preferential tax treatment compared to ordinary income and short-term gains. The federal rates are 0%, 15%, or 20%, depending on the taxpayer's total taxable income. For 2024, single filers with taxable income below $47,025 pay 0% on long-term gains. Those between $47,026 and $518,900 pay 15%, and those above $518,900 pay 20%. These thresholds are roughly doubled for married couples filing jointly. An additional 3.8% Net Investment Income Tax applies to high-income taxpayers, bringing the top effective federal rate to 23.8%.
The 0% rate is one of the most underutilized tax strategies. Retirees with modest taxable income, young investors with low earnings, and anyone in a low-income year can realize substantial gains without paying federal tax. For example, a retiree with $30,000 in taxable income can realize $17,000 in long-term gains completely tax-free at the federal level. This is particularly valuable for tax-loss harvesting, rebalancing, and stepping up basis in appreciated assets. Financial advisors often recommend tax-gain harvesting for clients in the 0% bracket, which involves realizing gains and immediately repurchasing the same security to establish a higher cost basis for future sales.
The bracket stacking works by adding the gain on top of other income. A taxpayer with $40,000 in income who realizes a $20,000 long-term gain pays 0% on the first $7,025 of the gain (which brings total income to $47,025) and 15% on the remaining $12,975. The effective rate is 9.75%, not 15%. This tiered structure means that even taxpayers in the 15% bracket may pay less than 15% on their entire gain. Understanding these mechanics allows investors to time sales strategically, potentially saving thousands in taxes. This calculator models the full bracket stacking for accurate tax estimation. The long-term preference has been a feature of the tax code since 1921, though the rates and brackets have changed repeatedly through legislative action.
Long-term gains also feature prominently in estate planning. Assets held until death receive a stepped-up basis, eliminating built-in gain for heirs. This interaction between the long-term preference and the estate tax makes holding periods a central consideration for wealthy families. Congress has debated limiting or eliminating the stepped-up basis, but the provision remains in effect as of 2024.
The long-term capital gains preference faces periodic legislative risk. Proposals to tax gains as ordinary income or to impose mark-to-market taxation on wealthy taxpayers appear regularly in federal budget discussions. While none have been enacted as of 2024, investors with large unrealized gains should monitor legislative developments and consider acceleration strategies if rates appear likely to rise.
Qualified Small Business Stock (QSBS) under Section 1202 provides an even more favorable exclusion of up to 100% of gain for investments in certain C-corporations held for more than five years. This exclusion is capped at the greater of $10 million or ten times the basis, making it one of the most powerful tax incentives for startup investors.
Understanding these rules is essential for comprehensive wealth management.
What is long-term capital gains tax calculator?
Long-term capital gains are profits from selling assets held for more than one year. They are taxed at preferential federal rates of 0%, 15%, or 20% based on the taxpayer's total taxable income. These rates are significantly lower than ordinary income rates, which top out at 37%. The preferential treatment is designed to encourage long-term investment and reduce the tax burden on capital formation.
The statutory authority is found in Internal Revenue Code Section 1(h), which prescribes the alternative tax rate for net capital gain. A capital asset must be held for more than one year to qualify; the holding period is measured from the day after acquisition to the date of sale. The unit of taxation is the dollar of gain, but the rate schedule is independent of the ordinary income brackets. Taxpayers report long-term gains on Schedule D and calculate the tax on the Qualified Dividends and Capital Gain Tax Worksheet. The distinction between long-term and short-term is one of the most consequential classifications in individual taxation, affecting billions of dollars in annual tax liability.
Taxpayers complete the Qualified Dividends and Capital Gain Tax Worksheet to compute the tax.
Collectibles, such as art and precious metals, are taxed at a maximum rate of 28% regardless of holding period.
How to use this calculator.
- Enter the purchase price of the asset.
- Input the sale price.
- Enter your other taxable income for the year.
- Select your filing status.
- Optionally add your state's capital gains tax rate.
- Review the capital gain, federal tax bracket, and total tax.
- Compare with short-term rates to quantify the benefit of holding longer.
The formula.
The long-term capital gains tax calculation uses a tiered bracket system that is stacked on top of the taxpayer's other taxable income. Unlike ordinary income brackets, there are only three long-term brackets: 0%, 15%, and 20%. The thresholds for these brackets are separate from the ordinary income brackets and are indexed annually for inflation.
The stacking method works as follows: the taxpayer's other taxable income determines the starting point within the long-term brackets. If a single filer has $40,000 in other income, the first $7,025 of any long-term gain falls in the 0% bracket, and any gain above that falls in the 15% bracket. If the same filer had $60,000 in other income, the entire gain would fall in the 15% bracket because the starting point is already above the 0% threshold.
The 20% bracket applies only to the portion of total income (other income plus gain) that exceeds $518,900 for single filers. A taxpayer with $500,000 in other income who realizes a $50,000 gain pays 20% on the entire gain because the starting point is already in the 20% bracket. A taxpayer with $450,000 in other income pays 15% on the first $68,900 of gain and 20% on the remainder. This tiered structure makes the effective rate a weighted average of the marginal rates. State taxes, if applicable, are typically flat percentages of the total gain, though some states mirror the federal tiered system.
Mathematically, let I be other taxable income, G be the long-term gain, and T0, T1 be the bracket thresholds. The 0% portion is max(0, min(G, T0 minus I)). The 15% portion is max(0, min(G minus max(0, T0 minus I), T1 minus max(I, T0))). The 20% portion is G minus the sum of the first two portions. Federal tax equals 0.15 times the 15% portion plus 0.20 times the 20% portion. The effective federal rate is federal tax divided by G. This piecewise function is continuous and monotonic in G.
The effective federal rate provides a single summary metric for comparison.
This rate structure creates powerful incentives for patient capital allocation.
This mechanism ensures that long-term capital receives favorable treatment under the tax code.
Taxpayers should model multi-year scenarios carefully.
A worked example.
An investor buys stock for $100,000 and sells it after 18 months for $140,000, producing a $40,000 long-term capital gain. The investor's other taxable income is $42,000. For 2024, the 0% long-term bracket for single filers ends at $47,025. The first $5,025 of the gain falls in the 0% bracket, bringing total income to $47,025. The remaining $34,975 falls in the 15% bracket, producing federal tax of $5,246.25. The effective federal rate on the entire gain is 13.1%, not 15%. If the investor had $60,000 in other income, the entire gain would be in the 15% bracket, producing $6,000 in tax. The $18,000 difference in other income produces a $1,753.75 difference in capital gains tax, demonstrating how income timing affects tax liability. This example shows why investors in variable-income professions should coordinate gain realization with low-income years, and why retirees often realize gains before required minimum distributions begin. Careful timing can produce significant tax savings.
Frequently asked questions.
What is the holding period for long-term capital gains?
How does the 0% rate work?
Can I have 0% federal tax but still owe state tax?
What is the Net Investment Income Tax?
Do long-term gains affect my Medicare premiums?
Can I offset long-term gains with short-term losses?
How do qualified dividends relate to long-term gains?
Should I realize gains in a low-income year?
References& sources.
- [1]IRS (2024). "Publication 544: Sales and Other Dispositions of Assets."
- [2]IRS (2023). "Rev. Proc. 2023-34: Inflation Adjustments for 2024."
- [3]IRS (2024). "Topic No. 409: Capital Gains and Losses."
- [4]IRS (2024). "Publication 550: Investment Income and Expenses."
- [5]Tax Foundation (2023). "State Individual Income Tax Rates and Brackets."
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 313 calculators remain free
- No billing is enabled