Home Finance Capital Gains Calculator

Capital Gains Calculator

Estimate capital gains tax on assets.

Input

Result

ADVERTISEMENT

What is a Capital Gains Calculator?

A Capital Gains Calculator helps you estimate the tax liability when you sell an asset for a profit. By entering your purchase price, sale price, holding period, and tax rate, you can see exactly how much tax you owe and your net profit.

How to calculate capital gains tax manually (the formula)

Capital Gain = Sale Price − Purchase Price − Transaction Costs

Capital Gains Tax = Capital Gain × Tax Rate

Net Profit = Sale Price − Purchase Price − Transaction Costs − Capital Gains Tax

Example calculation

Bought 100 shares at $50 each, sold at $75 each, $10 commission each way:
Purchase cost = (100 × $50) + $10 = $5,010
Sale proceeds = (100 × $75) − $10 = $7,490
Capital gain = $7,490 − $5,010 = $2,480
Held 14 months (long-term, 15% rate): Tax = $2,480 × 0.15 = $372
Net profit = $2,480 − $372 = $2,108

Common mistakes

  • Forgetting transaction costs — Broker commissions, exchange fees, and transfer taxes reduce your gain and should be subtracted from the sale proceeds.
  • Confusing short-term and long-term rates — Assets held for one year or less are taxed at ordinary income rates, which can be much higher than long-term capital gains rates.
  • Ignoring the wash sale rule — If you sell a security at a loss and buy a substantially identical security within 30 days, the loss is disallowed for tax purposes.
  • Not factoring in state capital gains tax — Many states also tax capital gains at their own rates, which can add 5–13% on top of federal taxes.

Frequently asked questions

What is a capital gains calculator?

A capital gains calculator estimates the tax you owe when you sell an asset like stocks, real estate, or cryptocurrency for more than you paid.

How is capital gains tax calculated?

Capital gain = Sale Price − Purchase Price − Associated Costs. The gain is then taxed at either the short-term rate (ordinary income rates) or long-term rate (0%, 15%, or 20%) depending on how long you held the asset.

What is the difference between short-term and long-term capital gains?

Short-term gains apply to assets held for one year or less and are taxed at your ordinary income tax rate. Long-term gains apply to assets held for more than one year and are taxed at preferential rates.

Can capital losses offset gains?

Yes. Capital losses can offset capital gains dollar for dollar. If losses exceed gains, you can deduct up to $3,000 ($1,500 if married filing separately) against ordinary income per year and carry forward remaining losses.

What assets are subject to capital gains tax?

Most assets held for investment purposes, including stocks, bonds, mutual funds, real estate (not your primary residence up to $250k/$500k exclusion), cryptocurrency, collectibles, and business assets.

Are there ways to avoid or reduce capital gains tax?

Strategies include holding assets for more than one year for long-term rates, harvesting losses to offset gains, using tax-advantaged accounts like IRAs and 401(k)s, and taking advantage of the primary residence exclusion.