Capital Gains Calculator
Quickly find your capital gain or loss when selling an investment. Enter what you paid and what you sold it for to see your taxable profit in seconds.
About this calculator
A capital gain is the profit you earn when you sell an asset for more than you paid for it. The core formula is straightforward: Capital Gain = Sale Price − Purchase Price. If the result is positive, you have a capital gain; if negative, you have a capital loss, which may offset other gains. In practice, your taxable gain can be further reduced by selling costs (commissions, fees) and adjusted cost basis items, but the fundamental calculation always starts with this difference. Governments typically tax short-term gains (assets held under one year) at ordinary income rates and long-term gains at preferential rates, so knowing your raw gain is the essential first step before applying any tax rate.
How to use
Suppose you bought 10 shares of a stock at $4,500 total (Purchase Price = $4,500) and later sold them for $6,800 (Sale Price = $6,800). Plug both numbers into the calculator: Capital Gain = $6,800 − $4,500 = $2,300. This $2,300 is your gross capital gain before any deductions or tax rate is applied. If you had sold for $3,900 instead, the result would be −$600, indicating a capital loss. Use this figure as your starting point when completing a tax return or estimating what you may owe.
Frequently asked questions
How do I calculate capital gains tax on a stock sale?
Start by finding your capital gain using the formula: Sale Price − Purchase Price. Once you know the gross gain, determine whether it is short-term (asset held 12 months or less) or long-term (held more than 12 months), as each is taxed at a different rate. In the US, long-term gains are taxed at 0%, 15%, or 20% depending on your income, while short-term gains are taxed as ordinary income. Multiply your gain by the applicable rate to estimate your tax liability. Always consult a tax professional for your specific situation, especially if selling costs or other adjustments apply.
What is the difference between a capital gain and a capital loss?
A capital gain occurs when you sell an asset for more than its purchase price, resulting in a positive difference. A capital loss occurs when the sale price is lower than the purchase price, producing a negative result. Capital losses are valuable because they can offset capital gains dollar-for-dollar, reducing your overall tax bill. In the US, if losses exceed gains, you can deduct up to $3,000 of the net loss against ordinary income per year, carrying forward any remainder to future tax years. Tracking both gains and losses throughout the year is essential for accurate tax planning.
When do you have to pay capital gains tax after selling an investment?
Capital gains tax is generally owed for the tax year in which the sale occurs, not when you receive the proceeds. In the US, you report gains and losses on Schedule D of your federal tax return, filed by the April deadline. If you expect to owe a significant amount, you may need to make estimated quarterly tax payments to avoid underpayment penalties. The holding period — how long you owned the asset before selling — determines whether the gain is short-term or long-term and thus which tax rate applies. Some assets, such as a primary residence, may qualify for exclusions that reduce or eliminate the taxable gain.