Profit & Loss Calculator
Enter cost and selling price to get profit or loss in both absolute amount and percent on cost, plus a markup-based pricing helper.
Reviewed 17 November 2026 · Free · No account needed
How to use
- Enter the cost price.
- Enter the selling price.
- Read profit/loss amount and percent, plus gross margin.
- Optional: enter a markup percent to price a product.
Example
Input: Cost 800 · selling 1,000
Output: Profit 200 · +25% on cost · margin 20% of selling price
How it works
Profit or loss is selling price minus cost price. The percentage is that difference divided by cost price × 100 — a positive result is a profit, a negative one a loss.
Profit or loss = selling price − cost price, and the percentage is that difference ÷ cost price × 100. Gross margin is the same difference ÷ selling price × 100. The markup helper prices an item at cost × (1 + markup ÷ 100).
Cost 800 and selling price 1,000 is a profit of 200 — +25% on cost and a 20% margin. A 25% markup prices the same item at 1,000.
Edge cases to know
- Cost price must be positive; the selling price may be zero.
- Selling exactly at cost reports break-even.
- Markup (on cost) and margin (on selling price) are different conventions — both are shown to avoid confusion.
- Fees, discounts and taxes are not modelled.
Limits & compatibility
- Percentages follow the standard cost-price convention; margin uses selling price.
- Markup and margin are different conventions — both are shown to avoid confusion.
- Fees, discounts and taxes are not modelled.
Privacy
All calculations run locally in your browser. Nothing is transmitted to a server, and no values are stored.
Related tools
Questions about Profit & Loss Calculator
How is the profit or loss percentage calculated?
The percentage is measured on the cost price, the standard convention: profit = (selling − cost) ÷ cost × 100. The gross margin is measured against the selling price instead. Both are shown together — for a cost of 800 selling at 1,000 that is +25% on cost and a 20% margin — because mixing the two conventions is the most common mistake.
What is the difference between markup and margin here?
Markup is the percentage added on top of cost; margin is profit as a share of the final selling price. The same sale produces different percentages for each — 25% markup on 800 gives 1,000, which is only a 20% margin. The tool shows both so you can price in whichever convention your invoice or industry uses.
Can I work backwards from a markup to a selling price?
Yes. Enter the cost price and a markup percentage, and the helper returns the selling price: cost × (1 + markup ÷ 100). The markup cannot be negative, and it is treated as a percentage on cost — the same convention as the main profit figure — so a 100% markup doubles the price.
What shows when selling price equals cost?
Breakeven: the amount is 0 and both percentages read zero. Selling below cost reports a loss with the amount shown as a positive figure labelled as a loss. Costs must be positive, selling prices cannot be negative, and fees, discounts and taxes are not modelled — enter figures net of anything the sale excludes.