Profit Calculator
Calculate gross profit, profit margin, and markup from your cost price, selling price, and quantity sold. Runs entirely in your browser — nothing is uploaded.
🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.
Same currency as cost price
Example shown — replace it with your own numbers.
How it works
- Enter what each unit costs you and what you sell it for, in your currency.
- Enter how many units you sold.
- Total revenue, total cost, gross profit, profit margin, markup, and profit per unit update as you type.
The formulas
Gross profit is simply revenue minus cost:
Gross profit = (selling price × quantity) − (cost price × quantity)
Profit margin expresses that profit as a share of what you sold it for; markup expresses it as a share of what it cost you:
Profit margin (%) = (gross profit / total revenue) × 100
Markup (%) = (gross profit / total cost) × 100
Example: selling 150 units at $19.99 that cost $12 each gives $2,998.50 in revenue, $1,800 in cost, and $1,198.50 in gross profit — a profit margin of about 40.0% and a markup of about 66.6%.
FAQ
What's the difference between profit margin and markup?
Profit margin is profit as a percentage of your selling price (revenue) — how much of each sale is profit. Markup is profit as a percentage of your cost price — how much you added on top of what it cost you. The two numbers are always different for the same sale; margin is always the smaller of the two when there is a profit.
Does this include taxes, shipping, or other expenses?
No — it only compares cost price to selling price. If you have other per-unit costs (packaging, shipping, payment processing fees), add them into your cost price first so they're reflected in the result.
What if my selling price is lower than my cost price?
The calculator still works — it shows a negative gross profit and a warning that you're operating at a loss, along with exactly how much you're losing per unit.
Can I use this for a single sale instead of a bulk quantity?
Yes — set quantity to 1 and the totals will match your per-unit cost, price, and profit exactly.
Is my pricing data sent anywhere?
No. Every calculation happens locally in your browser with plain JavaScript — nothing about your costs, prices, or quantities is uploaded or logged.
What happens if I enter 0 for quantity?
It's rejected — quantity must be a whole number of at least 1, since selling zero units has no meaningful profit figure to show.
How we compare
| Feature | Online Tool Store | Spreadsheet formula | Accounting software |
|---|---|---|---|
| No sign-up or setup | ✓ | ✓ | ✗ |
| Shows margin and markup side by side, no formula to remember | ✓ | ✗ (you write it) | ✓ |
| Free, no premium tier | ✓ | ✓ | Usually a paid subscription |
A spreadsheet works, but you have to write and re-check the formula yourself, and full accounting software is overkill for a quick "what's my margin on this" check. Profit Calculator gets you margin, markup, and profit per unit in one page, with no setup.