Stock Profit and Loss Calculator
Calculate a closed long-only trade’s net profit, return on upfront purchase outlay and fixed-charge break-even. See gross and net cash components separately.
One homogeneous quantity, one major currency and explicit buy/sell charges. No tax, dividends, partial-sale matching, leverage, FX or personalized investment advice.
Trade cash accounting
Enter all five values and confirm the basis, or load the verified worked example.
Inputs stay in browser memory. Up to 12 fractional places; quantity and purchase price 0.000000000001–1000000000000, other amounts 0–1000000000000. Isolated 120-digit decimal arithmetic; half-even display rounding. Small nonzero amounts remain visible. Educational use, not personalized investment advice.
Understand the trade cash ledger
Charges can turn a price gain into a net loss. Understand the denominator, additional closing payments and the limits of a rounded break-even price.
Read the complete Stock Profit and Loss guideFormula and methodology
C = q×b + fb; N = q×s − fs.
P = q×(s−b) − fb − fs; return = 100P/C.
Fixed-charge break-even = (C+fs)/q.
B = q×b; C = B+fb; S = q×s; N = S−fs; G = q×(s−b); P = G−fb−fs; return = 100P/C; fixed-charge break-even = (C+fs)/q. C is the positive upfront purchase outlay. Selling charges reduce net proceeds once; they are not also added to C. Profit is computed directly from the price difference and charges, preserving small gains or losses beside large cash totals. The percentage is a simple holding-period accounting return, with no annualisation, dates or reinvestment.
Verified worked examples
Buy 10 shares at 100, pay a buy charge of 2, then sell all 10 at 120 with a sale charge of 3. Purchase consideration is 1000, upfront outlay 1002, gross proceeds 1200 and net proceeds 1197. Gross price gain is 200; net profit is 195. Return is 195/1002×100 = 19.4610778443…%, displayed as 19.461078%. Fixed-charge break-even is (1002+3)/10 = 100.50 per share. If the sale price were 80, net profit would be −205, not −200.
Inputs and interpretation
Choose a display market without changing currency units. Enter the full quantity, purchase price, sale price, and explicit total buy/sell charges; enter 0 for each absent charge. Confirm the consistent closed-trade basis. Calculate, inspect every cash component and the named denominator, and reconcile with your own records. Load the verified example or clear values to start again. Do not double-count a charge already embedded in a supplied price.
Assumptions and limitations
One fully closed, long-only homogeneous quantity in one currency, with separately stated fixed total buy and sell charges. No rate basis, compounding, recurring contribution, beginning/end timing, date convention or leap-year assumption applies. The confirmation is your assertion, not verification of a brokerage record. Market selection changes formatting only: USD, GBP, CAD, AUD or INR; GBP means pounds rather than GBX/pence.
Supported domain and common mistakes
Each input is a trimmed ungrouped decimal string of at most 48 characters and 12 fractional places. Quantity and buy price are 1e-12 through 1e12; other inputs are 0 through 1e12. Monetary outputs have absolute bounds of 2e24, return 2e38%, and break-even 3e24. Unsupported results are rejected. The isolated 120-digit half-even engine is checked against independent exact rational cash ledgers with absolute plus relative 1e-100 tolerances on deterministic vectors; this is not a uniform accuracy certification for every input. Currency rounds half-even to two places with tiny nonzero markers, return to six places, and extra summaries to eight significant figures. Never treat a rounded break-even display as an executable tick or a guarantee.
Do not enter 0.5 to mean a 0.5% commission: convert any percentage or per-share charge into the actual monetary total outside this model first. Do not combine mixed currencies, mismatched share units, partial sales or unmatched tax lots. Do not include a sell fee both in the net price and the fee box. Excluded dividends, taxes, spreads, financing and other costs can change a real economic outcome.
Frequently asked questions
How is stock profit calculated after fees?
Which cost is the percentage return based on?
Can I enter a sale price of zero?
Why can net sale proceeds be negative and return below −100%?
Does break-even include tax or guarantee an execution?
Can this handle fractional shares or several purchase lots?
Does changing the country convert my trade?
Sources and educational scope
Educational cash-accounting calculator, not personalized investment advice, tax reporting, a trade recommendation or a forecast. No live prices, FX, dividends, corporate-action adjustments, tax-lot matching, partial sales, shorts, leverage, fee schedule or tax calculation. Figures are user supplied; local account rules and qualified advice may be needed.
Reviewed . AI-assisted content under operator editorial responsibility; no independent expert financial review is claimed.
- SEC Investor.gov: understanding investment fees (opens in a new tab)
- MoneyHelper: investing for beginners (opens in a new tab)
- OSC GetSmarterAboutMoney: buying and selling stocks (opens in a new tab)
- ASIC Moneysmart: buying and selling shares (opens in a new tab)
- SEBI Investor: considerations before investing (opens in a new tab)