Stock Calculator
Calculate stock profit or loss from buy price, sell price, shares, and fees, and see total return and percentage change in one view.
Stock Calculator
Result will appear here...
What this stock calculator does
You bought some shares, you sold them or you are thinking about it, and you want the actual number rather than the one in your head. The one in your head almost certainly ignores commission, and commission is the reason a trade that looks like a winner sometimes is not.
Give this calculator your share count, your buying and selling prices, and the commission rate at each end. It returns what the purchase really cost you, what the sale really put in your pocket, the profit, the return on investment, and a fifth number that most stock calculators do not bother with: the price you would have to sell at just to get your money back.
That last one is the useful one, and it has a section of its own.
The fields are labelled in $, but the arithmetic is currency blind, so read the examples in whatever you trade in. Everything runs in your browser and nothing is stored.
How to use it
- Number of Shares. How many you bought.
- Buying Price. Price per share when you bought, not the total.
- Buying Commission. Your broker's rate as a percentage of the trade value. Type 0.5 for half a percent. If your broker charges a flat fee instead, there is a conversion below.
- Selling Price. Price per share when you sold, or the price you are considering.
- Selling Commission. Same as the buying rate, and usually the same number, though not always.
Press Calculate. Press Reset to clear it.
If your broker charges nothing, enter 0 in both commission fields and the tool becomes a straight profit calculator. Worth reading the section on zero commission before you assume that is true, though.
How the four numbers are worked out
Commission on the buy side gets added to what you pay:
Net buying cost = buying price × shares × (1 + buying commission)
Commission on the sell side gets subtracted from what you receive:
Net sale proceeds = selling price × shares × (1 − selling commission)
Then the two obvious ones:
Profit = net sale proceeds − net buying cost
ROI = (profit ÷ net buying cost) × 100
Notice that the ROI is measured against what you actually spent, including the buying commission, rather than against the raw share price. That is the honest denominator and it makes the return slightly lower than a naive calculation would give. It should.
The break-even price rearranges the same relationship to answer a different question, and is covered below.
A worked example
100 shares bought at 250, sold at 275, with 0.5 percent commission at each end.
Net buying cost: 250 × 100 × 1.005 = 25,125.00
Net sale proceeds: 275 × 100 × 0.995 = 27,362.50
Profit: 27,362.50 − 25,125.00 = 2,237.50
ROI: 2,237.50 ÷ 25,125.00 = 8.91 percent
Now compare that against what most people would say. The share price went from 250 to 275, which is a 10 percent rise. The actual return was 8.91 percent.
Commission took 1.09 percentage points out of a 10 point move, which is roughly a tenth of the whole gain, on a trade with a fairly modest commission rate. That is the gap between the number on the chart and the number in your account.
The break-even price, and why it matters more than the profit
Once you have bought, the profit figure is history. The number you actually need is the price at which selling gets you back to level, and this tool gives it to you.
Break-even price = buying price × (1 + buying commission) ÷ (1 − selling commission)
On our example, that is 250 × 1.005 ÷ 0.995 = 252.51. Sell below that and you have lost money even if the share price is above what you paid.
Which is the trap. A stock bought at 250 and sitting at 252 looks like a small win and is a small loss. Everyone who has traded has done this at least once.
How far the price has to move, by commission rate:
| Commission each way | Break-even price on a 100 buy | Required rise |
|---|---|---|
| 0.1% | 100.20 | 0.20% |
| 0.25% | 100.50 | 0.50% |
| 0.5% | 101.01 | 1.01% |
| 1.0% | 102.02 | 2.02% |
| 1.5% | 103.05 | 3.05% |
| 2.0% | 104.08 | 4.08% |
The pattern is worth memorising: the price has to rise by a bit more than twice your one-way commission rate. Twice because you pay it going in and coming out, and a bit more because the selling commission is charged on the larger sale value rather than on what you originally paid.
What trading often actually costs
Take that break-even figure and multiply it by how often you trade, and the arithmetic gets uncomfortable.
At 0.5 percent each way, every complete round trip needs a 1.01 percent gain before you have made anything at all. So:
| Round trips in a year | Cumulative gross gain needed just to break even |
|---|---|
| 10 | 10.1% |
| 50 | 50.3% |
| 100 | 100.5% |
| 250 | 251.3% |
Somebody trading in and out most days at that commission rate has to more than triple their money in gross terms to stand still in net terms. That is before tax, before being wrong on any individual trade, and before the bid-ask spread, which is a further cost this calculator does not see because it is buried in the prices you get filled at rather than itemised as a fee.
None of which is an argument against trading. It is an argument for knowing your number. Frequency is the multiplier on cost, and it is the variable most within your control.
Percentage, flat fee, and the myth of zero commission
This tool works in percentages, which is how most brokers across South Asia and much of Europe charge. Other models exist.
Flat fee per trade. Common in the UK and among older US brokers. To use this calculator, convert it: divide the fee by the trade value and multiply by 100. A 10 fee on a 5,000 trade is 0.2 percent. Note that this makes commission brutal on small trades and negligible on large ones. That same 10 fee on a 200 trade is 5 percent, which needs a 10 percent move to break even.
Minimum commission. Many percentage brokers also set a floor, something like 0.5 percent or 100, whichever is greater. On small trades the floor is what you actually pay, so work out the effective percentage and use that instead.
Zero commission. Increasingly common, and it does not mean free. The broker is usually making money somewhere else: on the spread you get filled at, on payment for order flow, on interest earned on your idle cash, or on currency conversion if you are buying foreign shares. Currency conversion in particular is often the largest single cost of an international trade and it never appears as a commission line. Enter 0 in the fields if there is genuinely no commission, but do not assume the trade was costless.
Other charges. Depending on where you trade there may be exchange fees, regulator levies, stamp duty or securities transaction tax. Roll them into your commission percentage if you want the tool to account for them.
Tax, and the one year line
The profit figure here is before tax. What you eventually keep depends on where you are and how long you held.
In the United States, the dividing line is one year. Hold for more than a year and the gain is long-term, taxed at preferential rates. Hold for a year or less and it is short-term, taxed as ordinary income at your marginal rate. The IRS counts the holding period from the day after you acquired the asset up to and including the day you disposed of it, so a position bought on 1 March and sold on 1 March the following year is short-term by one day.
That single day can be worth a lot, and it is the sort of detail that argues for checking your dates before selling rather than after.
Elsewhere the rules differ substantially. Some countries have no capital gains tax on listed equities, some tax gains as income regardless of holding period, and some apply a transaction tax at the point of sale instead. Our stock return calculator lets you enter a tax rate and see the after-tax figures alongside the gross ones.
Commission is generally deductible in the sense that it is part of your cost basis and reduces your proceeds, which is exactly how this calculator treats it. So the net figures here are closer to your taxable position than the raw price difference would be.
Questions people ask
What price do I need to sell at to break even?
Your buying price times one plus the buying commission, divided by one minus the selling commission. At 0.5 percent each way on a 250 purchase, that is 252.51.
Why is my return lower than the price rise?
Commission at both ends. A 10 percent price rise with 0.5 percent commission each way returns 8.91 percent. The gap is roughly twice your one-way rate.
My broker charges a flat fee, not a percentage. What do I enter?
Divide the fee by the trade value and multiply by 100. A 10 fee on a 5,000 trade is 0.2 percent.
My broker is commission free. Do I enter 0?
Yes, though the trade probably was not free. Spread, currency conversion and order routing are the usual places the cost sits instead.
Does it handle a loss?
Yes. Enter a selling price below your buying price and the profit and ROI come back negative.
Does the $label matter?
Not at all. The maths is pure arithmetic. Use rupees, dollars, pounds, anything.
Are dividends included?
No, this prices the capital gain only. For a return figure that accounts for time and tax, use the stock return calculator.
References
A note on sourcing. The profit and break-even arithmetic here is definitional. The tax treatment described, including the one year holding period line and the day counting convention, is set out by the Internal Revenue Service and applies to United States taxpayers only. Rules elsewhere differ, sometimes substantially.
- Internal Revenue Service, Topic No. 409, Capital Gains and Losses. https://www.irs.gov/taxtopics/tc409
- Internal Revenue Service, Stocks (Options, Splits, Traders). https://www.irs.gov/faqs/capital-gains-losses-and-sale-of-home/stocks-options-splits-traders
- Internal Revenue Service, Publication 550, Investment Income and Expenses (Including Capital Gains and Losses).
Olga Chernova is an equity research analyst and final year Economics and Finance student at the American University in Bulgaria, with hands on experience in valuation and financial modeling. She has passed CFA Level I and contributed to a 2nd place team in the 2025-2026 CFA Institute Research Challenge in Bulgaria. At Eon Tools, she reviews finance tools.
Other Tools
- Average Return Calculator
- Beta Stock Calculator
- Black Scholes Calculator
- Bond Calculator
- Bond Current Yield Calculator
- Bond Equivalent Yield Calculator
- Bond Yield Calculator
- Bond Yield To Maturity Calculator
- Book Value Per Share Calculator
- Call Option Calculator
- CAGR Calculator
- CAPM Calculator
- Carried Interest Calculator
- Cost Of Equity Calculator
- Coupon Rate Calculator
- Dividend Calculator
- Dividend Payout Ratio Calculator
- Dividend Yield Calculator
- Earnings Per Share Calculator
- Expense Ratio Calculator
- Fibonacci Retracement Calculator
- Forex Margin Calculator
- Holding Period Return Calculator
- Intrinsic Value Calculator
- Investment Income Calculator
- Margin Call Calculator
- Market Capitalization Calculator
- Mutual Fund Calculator
- Pivot Point Calculator
- Price To Book Ratio Calculator
- Price To Earnings Ratio Calculator
- Profitability Index Calculator
- Random Stock Picker NASDAQ
- Retention Ratio Calculator
- Return On Investment Calculator
- Sharpe Ratio Calculator
- Stock Average Calculator
- Stock Non Constant Growth Calculator
- Stock Return Calculator
- Total Shareholder Return TSR Calculator
- Yield To Call Calculator
- Zero Coupon Bond Calculator