Stock Calculator
Calculate total purchase cost, current position value, and trade profit/loss based on share price and quantities.
Analyze equity share purchases, total cost basis, and current position value. Input purchase price, share quantity, broker trading commissions, and track market gains or losses.
How this calculator works
Cost Basis = (Shares * Buy Price) + Commissions. Current Value = Shares * Current Price. Profit/Loss = Current Value - Cost Basis.
Key benefits
- Supports custom user-entered share counts, prices, and broker fees
- Clear breakdown of total invested capital vs current position equity
- Calculates break-even share price factoring in transaction costs
- No simulated live feeds; works entirely with your verified transaction numbers
Assumptions & exclusions
- Assumes all transactions execute at the user-specified input prices.
Frequently asked questions
Why does QalcTools not show live stock tickers?
To ensure maximum privacy and compliance, QalcTools never runs tracking scripts or delayed third-party ticker widgets. Users enter their actual fill prices and lot details to perform precise mathematical calculations.
What counts toward my total cost basis in this calculation?
Your cost basis is the shares multiplied by the buy price, plus the commission paid when buying. That full amount is what your proceeds must exceed before the trade shows a profit, which is why the break-even price sits slightly above the buy price whenever commissions are not zero.
How do dividends change the result of a stock trade?
Dividends you received while holding are added to the proceeds side of the trade, so they increase the profit and lower the break-even sale price. A stock whose price barely moved can still have been a winning trade once a few years of dividend payments are counted alongside the sale price.
What is the difference between a realized and an unrealized result?
A realized result comes from a completed sale: the prices are fixed and the profit or loss is locked in, with tax consequences in most cases. An unrealized result values an open position at today's price, so it changes with the market and can grow, shrink or disappear before you actually sell.
Why can a trade lose money even if I sell above my buy price?
Because commissions are charged at both ends. If you buy at $50 and sell at $50.05 but paid $15 of total commissions on a small position, the fees exceed the five-cent gain. The break-even price on this page shows exactly how far above your buy price the sale must be before the trade is genuinely ahead.
Does this calculator include taxes on my stock profit?
No. The profit shown is before tax. A realized gain is generally taxable, at rates that depend on how long you held the shares and on your income, and losses have their own rules. Use the profit figure here to understand the trade itself, then estimate the tax separately or check your brokerage's year-end tax documents.
Formula-Based Calculator · By QalcTools Editorial Team. Formulas tested against independent reference values · Content reviewed November 2026 by the QalcTools Editorial Team.
Methodology note: Direct cost-basis accounting following standard SEC and FINRA trade confirmation guidelines.
Related calculators
Category: Investments & Retirement Calculators
About this calculator
Before return percentages and annualized figures, a stock position comes down to three plain questions: what did the whole trade cost, what is it worth or what did it sell for, and what is the difference once every fee is counted? This calculator answers exactly those. Enter the buy price, the current or sale price, the number of shares, the broker commissions and any dividends received along the way, and it lays out the total cost basis, the proceeds, the net profit or loss and the break-even sale price — the level the stock must reach before the trade has made a cent after costs.
How it works
The tool builds the position from the purchase side first: shares times buy price, plus the buy commission, is your cost basis — the full amount committed. On the other side it values the shares at the sale or current price, subtracts the sell commission and adds any dividends you collected while holding, giving net proceeds. The difference between proceeds and basis is the profit or loss, and dividing it by the basis gives the return percentage. Finally it works out the break-even price: the per-share level at which proceeds would exactly repay the basis after the sell commission and dividends, so you can see at a glance how far the price sits from truly flat.
The formula, explained
Cost basis = Shares × Buy price + Buy commission; Net proceeds = Shares × Sale price − Sell commission + Dividends; Profit = Net proceeds − Cost basis; Break-even = (Cost basis + Sell commission − Dividends) ÷ Shares
- Cost basis — Total committed capital: share cost plus the buy-side commission ($)
- Net proceeds — Value realized or marked at the sale/current price, after sell commission, plus dividends received ($)
- Profit — Net proceeds minus cost basis; negative for a loss ($)
- Break-even price — Sale price per share at which profit would be exactly zero ($/share)
The engine floors shares, prices, commissions and dividends at zero. It computes the basis and proceeds exactly as the form presents them — note the page collects one total commission figure and splits it evenly between the buy and sell sides before calling the engine. Dividends are added to proceeds, so they raise profit and lower the break-even price. Return is profit divided by basis as a percentage, and an annualized figure is also produced using a 365-day holding period, which the page passes by default. The result is labelled realized or unrealized according to the trade-status selection. All money figures are rounded to cents and the break-even price to three decimals.
Inputs and variables
| Variable | Meaning | Example |
|---|---|---|
| Buy Price per Share | The price you actually paid per share, from your trade confirmation — not the price the stock trades at today. | $120.00 |
| Sell / Current Market Price | For a closed trade, the price you sold at; for an open position, today’s price, which turns the result into an unrealized mark-to-market figure. | $150.00 |
| Number of Shares | The size of the position. Every dollar of price movement is multiplied by this count, in both directions. | 200 shares |
| Total Broker Commission | Trading fees for the round trip. The page splits the total you enter evenly between the buy and sell sides of the calculation. | $20 total ($10 buy, $10 sell) |
| Total Dividends Received | Cash dividends collected while holding the shares. They count toward the trade’s proceeds and pull the break-even price down. | $0 in the worked example |
| Trade Status (Realized / Unrealized) | Whether the sale has actually happened. It changes the label on the result, not the arithmetic — an unrealized gain can still move or vanish. | Realized (closed sale) |
Worked example
An investor buys 200 shares at $120, pays $20 of total commission ($10 on each side), receives no dividends, and later sells all 200 shares at $150 in a closed trade.
- Buy price / shares: $120.00 × 200 shares
- Sale price: $150.00
- Commissions: $10 buy + $10 sell
- Dividends received: $0
- Cost basis: 200 × $120 + $10 = $24,010 committed to the trade.
- Gross proceeds: 200 × $150 = $30,000. Net proceeds after the $10 sell commission: $29,990.
- Net profit: $29,990 − $24,010 = $5,980. Return on the basis: $5,980 ÷ $24,010 = 24.91%.
- Break-even sale price: ($24,010 + $10 − $0) ÷ 200 = $120.10 — ten cents above the buy price, entirely because of commissions.
A cost basis of $24,010, net proceeds of $29,990, a realized profit of $5,980 (24.91%), and a break-even sale price of $120.10 per share.
The headline price move was $30 a share, or 25 percent, yet the trade returned 24.91 percent — the small gap is the commissions doing quiet work at both ends. The break-even figure makes the same point permanently useful: any sale below $120.10 would have lost money despite a price above the purchase price. On small positions or with higher-fee brokers that gap widens fast, which is why the basis here includes fees instead of treating them as an afterthought.
Understanding your results
Profit in dollars and return in percent answer different questions. The dollar figure says what the trade added to your wealth; the percentage says how hard the capital worked, and it is the only fair way to compare a 200-share trade with a 20-share one. Both are computed on the full basis including commissions, so the percentage here will usually sit a little below the raw price change — that difference is the true cost of trading, made visible.
Keep the realized and unrealized labels honest in your own reading. An unrealized profit is an opinion the market holds today and can revise tomorrow; it becomes real only when you sell, and selling may itself move the proceeds through price changes and taxes. The break-even price is the most durable output for an open position: it converts a vague hope — “I am up on this one” — into an exact line the price must hold above.
Assumptions and limitations
This page values a single buy and a single sale at the prices you type in; it does not fetch market prices, model partial sales, splits or additional purchases, and it treats the dividends you enter as a single lump sum with no timing. Taxes on gains are outside the calculation entirely, and they can take a meaningful share of a realized profit depending on holding period and income. The annualized figure the engine also produces uses a fixed 365-day holding period passed by the page, so treat the total return and the break-even price as this page’s reliable outputs and check your brokerage statement for the authoritative record of any real trade.
Common mistakes to avoid
- Judging the trade by price change alone. A stock up 25% in price returned 24.91% in the example after commissions. Fees at both ends always sit between the price move and the money kept.
- Leaving dividends out of an open position. Dividends received are part of the trade’s proceeds and lower the break-even price. Excluding them understates a dividend payer’s true result.
- Calling an unrealized gain a profit. Until the sale closes, the figure is a mark at today’s price. The status selector labels it correctly; your spending plans should respect the label.
- Splitting commissions unevenly in your head. The form takes one total and halves it between buy and sell. If your broker charged materially different amounts per side, the break-even here is an approximation of your statement.
- Forgetting taxes on a realized gain. The profit shown is pre-tax. A closed winning trade can owe federal and state tax, so the amount you actually keep is lower than the result line.