Profit Margin Calculator
Runs locally in your browser. Nothing leaves your device.Calculate gross profit margin, profit, markup and target prices entirely locally.
Calculate profit margin
Gross profit margin
40.00%
- Gross profit
- $40.00
- Gross profit margin
- 40.00%
- Markup on cost
- 66.6667%
- Cost ratio
- 60.00%
- Total direct cost
- $60.00
Calculation
Margin = (revenue − total direct cost) ÷ revenue. Markup instead uses cost as its denominator.
$100.00 − $60.00 = $40.00
This calculates gross margin; overhead, taxes and financing are not included automatically.
How it works
- 1
Choose the calculation direction
Choose whether to calculate margin, required revenue, or maximum cost.
- 2
Enter the values
Enter revenue, cost, or target margin depending on the chosen direction, and optionally additional costs or fees.
- 3
Review the result and calculation path
Review profit, margin, markup, and other metrics, and copy the result if needed.
Good to know
The profit margin calculator calculates directly in your browser either the margin from revenue and cost, the revenue required for a target margin, or the maximum allowed direct cost for a target margin. Margin = (revenue − total direct cost) ÷ revenue; markup, by contrast, uses cost as the denominator — a common point of confusion.
Calculation runs locally in the browser. The gross margin is calculated; overhead, taxes, and financing are not automatically included. Additional fixed costs and a revenue-based fee can optionally be factored in.
Typical use cases
Check margin from existing revenue and cost
Enter revenue and direct cost to calculate the actual gross margin of a product or order.
Calculate the selling price for a target margin
Enter the direct cost and desired target margin to determine the required selling price or revenue.
Determine the maximum cost for a target margin
Enter revenue and target margin to calculate the maximum allowed direct cost, for example when negotiating purchasing or supplier terms.
Tips for better results
Don't confuse margin and markup
Margin uses revenue as the denominator, markup uses cost — with the same profit amount, the two produce different percentages.
Only include direct costs
The calculator determines gross margin from direct costs; overhead, taxes, and financing costs should be calculated separately.
Features
Three calculation directions
Calculate margin from revenue and cost, required revenue, or maximum cost for a target margin.
Factor in additional costs and fees
Optionally factor additional fixed costs and a revenue-based fee into the calculation.
Margin and markup shown separately
Both metrics are shown transparently with their respective formula to avoid confusion.
Frequently asked questions
What's the difference between margin and markup?
Margin = profit ÷ revenue × 100, markup = profit ÷ cost × 100 — with the same profit amount, the percentages differ.
Are taxes and overhead included?
No. The gross margin is calculated from direct costs; overhead, taxes, and financing are not automatically included.
Are my inputs uploaded?
No. Calculation runs entirely locally in the browser.
More tools
Looking for another tool?
Every tool runs locally in your browser – no sign-up, no upload, and it works offline.