Profit margin tells you what share of your revenue you actually keep after costs. It’s one of the simplest numbers in business — and one of the most commonly misread, because it’s often confused with markup. This page shows exactly how margin is calculated from revenue and costs, walks through a worked example, and clears up the margin-versus-markup mix-up so you can read your own numbers correctly.
How profit margin is calculated
Profit margin starts with profit, which is just revenue minus costs. From there, margin expresses that profit as a percentage of revenue:
Profit = Revenue − Total costs
Profit margin (%) = Profit ÷ Revenue × 100
“Revenue” is everything you brought in for the period you’re measuring — total sales, total invoices paid, however you want to scope it. “Total costs” is everything it cost you to generate that revenue, including labor, materials, subcontractors, software, fees and overhead. The difference between the two is your profit in dollars. Dividing that profit by revenue, then multiplying by 100, turns it into the percentage you usually see quoted as “margin.”
The calculator above also shows the equivalent markup — the same profit expressed as a percentage of cost instead of revenue. That’s a different number, and the gap between the two is where a lot of pricing confusion comes from.
A worked example
Say your revenue for the period is $10,000 and your total costs are $6,000.
First, find the profit: $10,000 − $6,000 = $4,000.
Next, find the margin: $4,000 ÷ $10,000 × 100 = 40%. That means 40 cents of every dollar of revenue is profit, and the remaining 60 cents covered costs.
Now find the equivalent markup: $4,000 ÷ $6,000 × 100 ≈ 66.7%. That’s the same $4,000 of profit, just measured against cost instead of revenue. You marked your costs up by about two-thirds to arrive at your selling price, and that selling price produced a 40% margin.
These two percentages will always differ as long as you have any costs at all, and the gap gets bigger as margin increases. That’s the part people get wrong.
The mistake: confusing margin with markup
Margin and markup both describe the same profit, but they use different denominators — margin divides by revenue, markup divides by cost. Treat them as interchangeable and you’ll consistently misprice.
The classic version of this mistake: someone wants a 40% profit margin, so they add 40% to their cost. Using the example above, a $6,000 cost marked up by 40% gives a selling price of $8,400. The profit is $2,400, and the actual margin on that $8,400 of revenue is only $2,400 ÷ $8,400 ≈ 28.6% — not the 40% they were aiming for. To hit a true 40% margin, you need the 66.7% markup shown above, not a 40% one.
If you’re working from a target margin, divide by (1 − margin) rather than just adding the percentage to cost. If you’re working from a markup you already know, run it through this calculator to see what margin it actually produces — don’t assume the two numbers match.
What else affects your margin
The formula is fixed, but what you put into “revenue” and “costs” determines whether the output reflects reality:
- What counts as a cost. Direct costs like materials and subcontractors are obvious. Indirect costs — software, your own admin time, payment processing fees, returns and bad debt — are easy to leave out and will inflate your margin on paper.
- The time period you measure. A single project’s margin can look very different from your margin averaged across a slow month or a busy quarter. Be consistent about the period when comparing margins over time.
- Pricing decisions upstream. Your margin is a result, not an input — it only improves if you raise prices, lower costs, or both. Tracking it regularly tells you which lever to pull.
- Industry norms. A 40% margin might be thin in software and generous in retail. Compare your margin to others in your own field rather than a generic benchmark.
This calculator gives you an estimate based on the revenue and cost figures you enter — it’s plain arithmetic, not a judgment on your business. Plug in your own numbers above, check the margin and the equivalent markup side by side, and use them to sanity-check any pricing or quoting decision before you commit to it.