Skip to main content

Capital Gains Tax Calculator

Quickly compute capital gains tax with accurate formulas. See amortization schedules, growth projections, and side-by-side comparisons.

Skip to calculator
Finance & Investing

Capital Gains Tax Calculator

Calculate capital gains tax on stocks, real estate, or other assets. Determines short-term vs. long-term rates (0%, 15%, 20%) based on holding period and your income tax bracket.

Last updated: January 2026Reviewed by NovaCalculator Finance Editorial Team

Calculator

Adjust values & calculate
Understand the Math

Formula

Capital Gain = Sale Price - Purchase Price | Long-term (>12mo): 0/15/20% | Short-term (โ‰ค12mo): Ordinary income rate

Long-term capital gains (held >12 months) are taxed at 0%, 15%, or 20% depending on income. Short-term gains are taxed as ordinary income.

Last reviewed: January 2026

Worked Examples

Example 1: Stock sale

Buy $10K, sell $15K after 18 months, 22% bracket
Solution:
Gain=$5K, long-term, 15% rate โ†’ Tax=$750, Net=$4,250
Result: $750 tax, $4,250 net
Expert Insights

Background & Theory

The Capital Gains Tax Calculator applies the following established principles and formulas. Finance and investing rest on the foundational concept of the time value of money: a dollar received today is worth more than a dollar received in the future, because present funds can be deployed to earn a return. This principle underlies virtually every valuation technique in modern finance. The future value of a present sum P growing at rate r over n periods is expressed as FV = P(1 + r)^n, while the present value of a future cash flow FV is PV = FV / (1 + r)^n. Compound growth amplifies returns significantly over long horizons, a dynamic often described as the eighth wonder of the world. Net Present Value (NPV) extends these mechanics to evaluate investment projects by summing the present values of all expected cash flows minus the initial outlay: NPV = sum[CF_t / (1 + r)^t] - C_0. A positive NPV indicates the project creates value above the required return. The Internal Rate of Return (IRR) is the discount rate that sets NPV to zero, providing a single percentage benchmark for project comparison. The risk-return tradeoff is the central tension of investment theory. Higher expected returns generally require accepting greater uncertainty. Harry Markowitz formalized this in Modern Portfolio Theory by demonstrating that portfolio variance can be reduced through diversification when assets are imperfectly correlated. The efficient frontier represents the set of portfolios offering the maximum return for a given level of risk. The Capital Asset Pricing Model (CAPM) extends this by introducing the market portfolio as a reference, defining expected return as E(r) = r_f + beta * (E(r_m) - r_f), where beta measures an asset's sensitivity to systematic market risk. Asset classes โ€” equities, fixed income, real assets, and alternatives โ€” differ in their return profiles, liquidity, and correlations. Strategic asset allocation determines long-run target weights based on investor objectives and risk tolerance, while tactical allocation permits short-run deviations to exploit perceived mispricings. Discount rates used in valuation models must reflect the cost of capital appropriate to the risk of the cash flows being discounted, a point stressed in corporate finance texts from Brealey, Myers, and Allen through to Damodaran.

History

The history behind the Capital Gains Tax Calculator traces back through the following developments. The formal practice of lending at interest dates to ancient Mesopotamia, where the Code of Hammurabi around 1750 BCE regulated interest rates on grain and silver loans. Banking as an institutional activity took root in medieval Italy, with merchant bankers in Florence and Venice financing trade across Europe through instruments such as bills of exchange. The Medici family operated one of the most sophisticated banking networks of the fifteenth century, pioneering double-entry bookkeeping and correspondent banking relationships. Organized equity markets emerged in the early seventeenth century. The Dutch East India Company (VOC), chartered in 1602, issued shares to the public and created the Amsterdam Stock Exchange โ€” widely regarded as the world's first formal stock exchange. The VOC allowed investors to buy and sell shares freely, establishing the template for the joint-stock company. The period also produced the Dutch tulip mania of 1636 to 1637, one of history's first recorded speculative bubbles, in which tulip bulb futures contracts reached extraordinary prices before collapsing. England's financial revolution followed in the late seventeenth century with the founding of the Bank of England in 1694 and the development of government bond markets. The South Sea Bubble of 1720 illustrated the dangers of speculative excess and contributed to early securities regulation. Throughout the eighteenth and nineteenth centuries, industrialization created enormous demand for capital, fueling the expansion of stock exchanges in London, Paris, New York, and beyond. The New York Stock Exchange, formalized in 1817, became the world's dominant equities market by the twentieth century. The Great Crash of 1929 and subsequent Great Depression prompted the US Securities Act of 1933 and Securities Exchange Act of 1934, establishing the SEC and mandatory disclosure requirements. Harry Markowitz published his landmark portfolio selection paper in 1952, launching quantitative finance. The CAPM emerged in the 1960s through work by Sharpe, Lintner, and Mossin. John Bogle launched the first retail index fund in 1976, democratizing diversified investing and challenging active management orthodoxy.

Key Features

  • Convert gross salary to net take-home pay by applying federal and state income tax withholding, Social Security, Medicare, and pre-tax benefit deductions for any pay frequency.
  • Break down your marginal versus effective tax rate side by side, showing exactly how much of each additional dollar earned is taxed compared to your overall average rate.
  • Compute FICA payroll taxes for employees and employers, including the Social Security wage base cap and the additional Medicare surtax for high earners.
  • Estimate W-4 withholding adjustments to target a specific refund or balance-due amount, accounting for multiple jobs, spouse income, and itemized deductions.
  • Visualize how income is taxed across federal brackets by displaying the dollar amount and percentage of income falling into each bracket from 10% through the top marginal rate.
  • Calculate the impact of maxing out 401k, HSA, and FSA contributions on take-home pay and tax liability, showing the true after-tax cost of each pre-tax dollar contributed.
  • Calculate self-employment tax on net self-employment income, including the deductible portion, and integrate it with income tax to show total tax obligation for freelancers and sole proprietors.
  • Determine applicable capital gains tax rates (0%, 15%, or 20% for long-term; ordinary rates for short-term) based on filing status and taxable income, including the net investment income surtax threshold.

Share this calculator

Explore More

Frequently Asked Questions

For 2024, long-term capital gains rates are 0% for single filers with taxable income up to $47,025 and married filing jointly up to $94,050; 15% for single filers earning $47,026 to $518,900 and married up to $583,750; and 20% for income above those thresholds. High-income earners also pay an additional 3.8% Net Investment Income Tax (NIIT) on gains if their modified adjusted gross income exceeds $200,000 (single) or $250,000 (married), effectively making the top rate 23.8%.
Yes. Capital losses directly offset capital gains dollar for dollar. Short-term losses first offset short-term gains, and long-term losses first offset long-term gains, before crossing over. If your losses exceed your gains, you can deduct up to $3,000 of net capital losses against ordinary income per year. Any losses beyond $3,000 are carried forward to future tax years indefinitely. This tax-loss harvesting strategy is commonly used by investors near year-end to sell losing positions to offset gains realized earlier in the year.
For your primary residence, the IRS allows a capital gains exclusion of up to $250,000 (single) or $500,000 (married filing jointly) if you have owned and lived in the home for at least 2 of the 5 years before the sale. For investment real estate, long-term gains are taxed at 0%, 15%, or 20%, but depreciation taken during ownership is recaptured at a 25% rate. Real estate investors may also defer capital gains through a 1031 exchange by reinvesting proceeds into another investment property within 180 days of the sale.
You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.
All calculations use established mathematical formulas and are performed with high-precision arithmetic. Results are accurate to the precision shown. For critical decisions in finance, medicine, or engineering, always verify results with a qualified professional.
No. All calculations run entirely in your browser using JavaScript. No data you enter is ever transmitted to any server or stored anywhere. Your inputs remain completely private.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings.Reviewed by: NovaCalculator Finance Editorial Team โ€” Reviewed against CFPB, IRS, and Federal Reserve guidance. Last reviewed: January 2026. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

Capital Gain = Sale Price - Purchase Price | Long-term (>12mo): 0/15/20% | Short-term (โ‰ค12mo): Ordinary income rate

Long-term capital gains (held >12 months) are taxed at 0%, 15%, or 20% depending on income. Short-term gains are taxed as ordinary income.

Frequently Asked Questions

Is my data stored or sent to a server?

No. All calculations run entirely in your browser using JavaScript. No data you enter is ever transmitted to any server or stored anywhere. Your inputs remain completely private.

What inputs do I need to use Capital Gains Tax Calculator accurately?

Each field is labelled with the required unit (metric or imperial). Gather your source values before starting โ€” for example, a weight measurement in kilograms, a distance in metres, or a dollar amount โ€” and enter them exactly as measured. The formula section on this page lists every variable and explains what each represents.

Can I use Capital Gains Tax Calculator on a mobile device?

Yes. All calculators on NovaCalculator are fully responsive and work on smartphones, tablets, and desktops. The layout adapts automatically to your screen size.

Does Capital Gains Tax Calculator work offline?

Once the page is loaded, the calculation logic runs entirely in your browser. If you have already opened the page, most calculators will continue to work even if your internet connection is lost, since no server requests are needed for computation.

How do I interpret the result?

Results are displayed with a label and unit to help you understand the output. Many calculators include a short explanation or classification below the result (for example, a BMI category or risk level). Refer to the worked examples section on this page for real-world context.

Can I use the results for professional or academic purposes?

You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.

Reviewed by Sahil, Senior Finance & Tax Editor ยท Editorial policy