How This Calculator Works
Enter how many shares or units you traded, your buy price and sell price per unit, and any fees your broker charged on either side. The calculator instantly works out your net cost, net proceeds, gross profit or loss, breakeven price, and — if you enter a tax rate — your after-tax net profit or loss too. Everything updates live as you type, so you can test different sell prices before you actually place a trade.
The Profit / Loss Formula
The math behind this calculator comes down to four steps: net cost = (buy price × shares) + buy fees, net proceeds = (sell price × shares) − sell fees, profit or loss = net proceeds − net cost, and ROI = profit or loss ÷ net cost × 100. For example, buying 100 shares at $25 with a $5 fee gives a net cost of $2,505. Selling those same 100 shares at $32 with a $5 fee gives net proceeds of $3,195. That's a $690 gross profit — a 27.5% ROI on the $2,505 invested.
Understanding Each Input Field
Number of shares/units is simply the quantity you bought and sold — this calculator assumes the same quantity on both sides of the trade. Buy price and sell price are the per-unit prices you paid and received, before fees. Buy fees and sell fees cover broker commissions, exchange fees, or any other flat cost tied to executing the trade — enter them as a total dollar amount rather than a percentage. Capital gains tax rate is optional: leave it at 0% to see your pre-tax numbers only, or enter your own estimated rate to also see a net-of-tax figure. The holding period selector doesn't change the math directly — since actual tax brackets depend on your income and country — but it's a useful label to remind you which capital gains rules likely apply.
Realized vs. Unrealized Profit and Loss
A realized gain or loss happens the moment you actually sell an asset — it's locked in, final, and (where applicable) the figure your tax authority cares about. An unrealized gain or loss, sometimes called a "paper" gain or loss, is just the current value of a position you still hold compared to what you paid for it. It moves with the market every day and isn't taxed until you sell. This calculator is built around a completed trade, so every figure it shows — profit, ROI, tax owed — represents a realized outcome. If you want to check where you currently stand on an open position, simply enter today's price as the "sell price" to see your unrealized profit or loss as of right now.
Short-Term vs. Long-Term Capital Gains Tax
In the United States, how long you hold an investment before selling determines which tax rules apply. Sell within one year or less of buying, and any profit is a short-term capital gain, taxed at your regular income tax rate — which can run as high as 37% depending on your bracket. Hold for more than one year, and the profit becomes a long-term capital gain, taxed instead at preferential rates of 0%, 15%, or 20% depending on your total taxable income. That gap is often large enough that waiting a few extra weeks to cross the one-year mark can meaningfully change your after-tax return. Other countries set their own holding-period thresholds and rates, so always confirm the rule that applies where you're taxed before relying on an estimate.
Common Mistakes When Calculating Investment Profit
The most common error is comparing raw sell price to raw buy price and ignoring fees entirely — on a small trade, commissions can quietly eat a large share of the actual profit. A second frequent mistake is subtracting tax from the sell price instead of from the profit; tax applies only to the gain, not to the full proceeds of the sale. A third is forgetting that the breakeven price already has to cover both buy-side and sell-side fees, so it sits a little above your raw buy price, not exactly at it. Finally, mixing up realized and unrealized figures — reporting a paper gain on a position you haven't sold as if it were locked-in, taxable profit — can lead to a nasty surprise if the price drops back down before you actually sell.
Frequently Asked Questions
How do I calculate profit or loss on a stock or share trade?
Multiply your buy price by the number of shares and add any buying fees to get your net cost. Multiply your sell price by the number of shares and subtract any selling fees to get your net proceeds. Your profit or loss is simply net proceeds minus net cost — a positive number is a profit, a negative number is a loss.
What is the breakeven price?
The breakeven price is the exact sell price per share at which your net proceeds equal your net cost — zero profit, zero loss. It already accounts for both your buying and selling fees, so it's usually a little higher than your raw buy price, not equal to it.
What's the difference between ROI and net ROI here?
ROI (gross) measures your return before any tax is subtracted, based on gross profit divided by net cost. Net ROI measures your return after the capital gains tax you entered has been deducted from the profit, giving a more realistic picture of what you actually keep.
Do I have to pay tax on investment profit?
In most countries, realized capital gains — profit from an asset you've actually sold — are taxable, while unrealized gains on positions you still hold are not taxed until you sell. Exact rates depend on your country, income level, and how long you held the asset, so this calculator lets you enter your own estimated tax rate rather than assuming one.
What's the difference between realized and unrealized profit or loss?
Realized profit or loss happens when you actually sell an asset and lock in the result — it's final and, where applicable, taxable. Unrealized profit or loss is just the current paper value of a position you still hold; it can change every day until you sell, and it generally isn't taxed.
Should I include dividends in my profit calculation?
This calculator focuses on capital gains from the buy-sell price difference. If you also received dividends or other cash distributions while holding the position, add them to the net profit figure separately to see your full total return, since dividend tax treatment often differs from capital gains tax treatment.
What counts as short-term vs. long-term for capital gains?
In the US, an asset held for one year or less before selling produces a short-term capital gain, taxed at your ordinary income tax rate. Holding it for more than one year produces a long-term capital gain, which qualifies for lower preferential tax rates. Other countries use different holding-period rules, so check your local tax code.
Can I use this for crypto, forex, or other assets too?
Yes — the buy price, sell price, quantity, and fee math works identically for stocks, ETFs, forex lots, or any other per-unit asset. If you specifically trade cryptocurrency and want features like leverage and liquidation price, our dedicated crypto profit/loss calculator covers those extras.
This calculator provides general estimates only. It is not tax, legal, or investment advice — confirm your exact tax treatment with a qualified professional before making decisions based on these numbers.