Position Calculator On-device
Stored only on this device. No account, and no numbers in the URL.
No positions yet
Log the buys and sells for one stock and it computes the cost, the commission, the realized profit, and what your remaining shares really cost.
WORKED EXAMPLE
Buy 2,000 at 7.62, sell 2,000 at 7.80 → realized 331.00 after 46.00 commission.
Broker presets
VAT applies to the fee, not to the trade value.
fee SAR 0.00
0% of trade value
Your own numbers, entered by you, stored only on this device. Not investment advice.
Log the buys and sells for a stock and it works out your cost basis, the commission you actually paid, realized profit, and what your remaining shares really cost after a partial exit. Your own numbers, on your own device — no prices are fetched and nothing is uploaded.
About this tool
What you provide
- Every buy and sell for one stock: quantity, price and date
- Your broker's commission model — percentage, per-share, flat or none — with its minimum fee and the VAT charged on the fee
- A price to test, typed or dragged, and optionally a number of shares to model selling
What you get
- Adjusted cost basis — what your remaining shares cost you after what you have already sold, commission included
- Remaining shares, total P/L at any price, and the break-even price
- Average cost, average sell price, realized P/L, total commission, total invested and total received
- The resulting realized P/L, remaining shares and new basis for a partial sell you are considering
Limits
- Arithmetic on trades you enter yourself — not investment advice, and no substitute for your broker statement.
- No live prices. Nothing is fetched, and no market data is included.
- Cost is a weighted average across every buy, not FIFO or tax-lot accounting — so adding an older trade later will change a past sale's realized profit.
- Currency conversion uses a rate you type in yourself, with the date you entered it shown beside it.
How to use it
Set your broker's fees once
Open the broker presets and pick the model your broker uses — a percentage of the trade, an amount per share, a flat fee, or none — then enter its minimum fee and the VAT charged on the fee. The live sample recomputes as you type, so you can check it against a real statement before you rely on it.
Add the position and its trades
Add a position for the ticker, then log each buy and sell with its quantity, price and date. The commission is worked out from your preset as you type; if a trade's fee did not match, edit it on that trade and it is marked as edited without changing the preset.
Read the three headline figures
Adjusted cost basis, remaining shares and total profit or loss sit at the top. The adjusted basis is what your remaining shares actually cost after the money you have already taken back out — the figure most calculators never show.
Check any number's arithmetic
Tap a figure to expand the calculation behind it: the inputs, the formula in plain language, and the result. Every derived number can be opened this way, so you can reconcile it against your broker statement line by line.
Try a price, or a partial sell
Drag the price slider or type an exact price to see the total profit or loss there, with the break-even marker fixed on the track. Expand the partial-sell panel to enter a number of shares and see the realized profit, the shares left and the new adjusted basis — nothing is saved by modelling it.
Frequently asked questions
What is an adjusted cost basis, and why does it matter?
It is what your remaining shares actually cost you after subtracting the money you already took back out by selling some. If you bought 3,748 shares and have sold all but 400, the adjusted basis is what those 400 really cost — often far below your original average price. It is also your break-even price, and most calculators never show it.
Does it include my broker's commission?
Yes. Commission increases what a buy cost you and reduces what a sell paid you, so it is inside the cost basis rather than reported separately. Total commission is shown as a first-class figure too, because it is the most under-noticed real cost in trading.
Does this fetch live share prices?
No. There are no market prices in this tool at all. It does arithmetic on trades you type in, so you decide which price to test — by dragging the slider or typing an exact number.
Where is my position data stored?
Only on your device, in your browser. There is no account, nothing is uploaded, and no symbol, quantity, price or profit figure is ever put in the address bar. You can export a JSON backup or delete everything at any time.
Why did an old trade's realized profit change when I added another buy?
Cost is a weighted average across every buy in the position, so adding a buy changes the average that past sales were measured against. That is the model this tool uses — it does not do FIFO or tax-lot accounting — and each realized figure names the basis it was measured against so the change is never a mystery.