The formula
How to calculate stock profit
The profit on a share trade is the price difference times the number of shares, less everything the trade cost you. Fees are small on a large position and decisive on a small one, which is why the break-even price is worth knowing before you buy.
Include both sides: the commission to buy, the commission to sell, and any transaction tax. In the UK that means 0.5% stamp duty on most purchases, which is often larger than the broker's fee.
What to enter:
- Buy price per share
- Sell price per share
- Number of shares
- Total fees and commission — both sides of the trade, plus any stamp duty
The result updates on every keystroke. The URL updates too, which makes the filled-in version easy to bookmark or send to someone else.
The order the fields are filled in makes no difference to the result — the calculator recomputes the whole formula from whatever is currently in every field, not step by step. That means it is safe to adjust one number, watch the result change, and adjust it back, without worrying about resetting anything first.
Why stock profit matters
The formula behind stock profit is standard and has not changed in decades; what changes is the situation it gets applied to. Two households can run the identical calculation and land on very different conclusions once their own numbers — income, rate, term, balance — are dropped in, which is why a generic textbook example is less useful than a calculator you can adjust to match your own circumstances.
It is also useful as a sense check before signing anything. A quote, an offer letter or a spreadsheet from someone else can contain an error, an optimistic assumption, or simply a different convention for rounding — running the same inputs through an independent calculator is a quick way to confirm a number before relying on it.
This kind of calculation rarely stands entirely alone. A stock profit figure usually feeds into a wider decision — how it compares with a competing offer, whether it fits inside a monthly budget, what it does to a longer-term plan — and the value of having it as an exact number rather than a rough guess is that those follow-on comparisons stop being guesswork too. Once one figure in a decision is precise, it is worth making the effort to get the others precise as well, rather than mixing an exact calculation with several estimates and treating the result as equally reliable.
A calculator like this one is often bookmarked and returned to repeatedly over months rather than used once, particularly for anything tied to an ongoing plan such as a mortgage, a savings goal or an investment being tracked. Because the figures live in the web address rather than only in memory, coming back to the same page with updated numbers is quicker than starting from a blank spreadsheet each time.
Worked example
Here is the calculation with the starting values:
- Buy price per share: 28
- Sell price per share: 42
- Number of shares: 300
- Total fees and commission: 24
That gives:
- Net profit: 4,176
- Return on investment: 49.71 %
- Break-even sell price: 28.08
These figures are only the calculator's own starting values, included so the working is visible rather than hidden inside the tool above. Replace them with your own numbers and the same arithmetic applies — nothing about the method changes, only the inputs feeding it.
Reading the result
Return on investment here is a total figure, not an annual one. A 49% return is excellent over one year and unremarkable over eight — annualise it before comparing against anything else.
Where this goes wrong. Forgetting tax on the gain. Outside an ISA or pension, profits above the annual exempt amount attract capital gains tax, and the net figure can be materially below the one shown here.
A useful check on any unfamiliar result is to compare it against a rough mental estimate first — round the inputs to convenient numbers and see whether the calculator's answer lands in roughly the same territory. A wildly different figure usually means one of the fields was entered in the wrong unit, most often a percentage typed as a whole number where a decimal was expected, or the reverse.
No, this is the capital gain only. Add dividends received during the holding period to get the total return, which for income-paying shares held several years can be a large share of the result.
The answer it gives you is net profit. With 28 buy price per share, 42 sell price per share and 300 number of shares, that comes to 4,176. Change any field and the figure moves with it.
Whenever one of the underlying figures changes — a new interest rate, a different balance, an updated term — since the result only reflects what is currently in the fields. There is no need to keep a separate record of past results; the web address for a filled-in version already carries the figures used to produce it.
Not unless a tax rate or a fee is explicitly one of the inputs above. Where it is not, the figure shown is a gross calculation, and any tax due depends on your personal circumstances and current tax rules, which are worth checking separately.
The arithmetic itself is exact — the calculator applies the formula shown above precisely, with no rounding until the final figure is displayed. The uncertainty, where it exists, is entirely in the inputs: an estimated rate or an approximate balance carries that same approximation through to the result.