How to Calculate Profit Margin: Formulas, Examples, and Benchmarks
Gross, operating, and net margin explained with a worked example, the margin-vs-markup trap, industry benchmark ranges, and the three bookkeeping errors that make your margin wrong.
Profit margin is the percentage of revenue you keep after costs. That is the whole idea. The reason it confuses people is that there are three different margins, they use three different cost bases, and almost everyone at some point divides by the wrong number.
This guide covers all three formulas, a worked example you can follow line by line, the margin-versus-markup trap that quietly underprices thousands of small businesses, and the three bookkeeping errors that make the number on your P&L wrong in the first place.
If you would rather just get the answer, run your numbers through our free profit margin calculator and come back for the interpretation.
The profit margin formula
Every profit margin follows the same structure:
Profit margin = (Profit ÷ Revenue) × 100
Revenue is always the denominator. Always. The only thing that changes between the three margins is how much cost you subtract to get to "profit."
1. Gross profit margin
(Revenue − Cost of goods sold) ÷ Revenue
Cost of goods sold, or COGS, means costs that exist only because you did the work: materials, subcontractors, billable labor, merchant processing fees, freight in. Rent is not COGS. Your accounting software subscription is not COGS.
Gross margin answers one question: is the work itself priced correctly? If gross margin is weak, no amount of overhead-cutting saves you, because you are losing money on every unit you sell. You have a pricing problem, not an expense problem.
2. Operating profit margin
(Gross profit − Operating expenses) ÷ Revenue
Now add the costs of existing: rent, insurance, software, admin payroll, marketing, professional fees. Operating margin answers: can the business carry itself on the work it does?
This is the number to watch as you grow. Revenue can climb 40% while operating margin falls, which means you bought growth by adding overhead faster than you added gross profit.
3. Net profit margin
(Revenue − All costs) ÷ Revenue
Everything comes out: interest on debt, taxes, depreciation, one-time costs. Net margin is what a lender underwrites, what a buyer values, and what the IRS taxes. It is also the number owners quote least accurately, because most of them have never seen it calculated on properly reconciled books.
A worked example
A contractor bills $50,000 in March. Materials and subcontractors run $22,000. Overhead is $15,000. Interest and other costs are $2,000.
| Revenue | $50,000 | |
| Less cost of goods sold | ($22,000) | |
| Gross profit | $28,000 | 56.0% gross margin |
| Less operating expenses | ($15,000) | |
| Operating profit | $13,000 | 26.0% operating margin |
| Less interest and other | ($2,000) | |
| Net profit | $11,000 | 22.0% net margin |
Three margins, one month, one business: 56%, 26%, 22%. When someone tells you their margin is "about 50%," they are almost always quoting gross and thinking about net.
Margin vs. markup: the expensive mistake
Margin divides profit by the price. Markup divides the same profit by the cost.
An item costs $100 and sells for $150. Profit is $50.
- Margin = $50 ÷ $150 = 33.3%
- Markup = $50 ÷ $100 = 50%
Same transaction, two numbers seventeen points apart. Here is where it costs real money: an owner decides they need a 30% margin, so they add 30% to cost. That produces a 23.1% margin, not 30%. Across a year of jobs, that gap is often the entire difference between a profitable year and a break-even one.
To price for a target margin, divide cost by (1 − margin):
| Target margin | Required markup | Price on $100 cost |
| 10% | 11.1% | $111 |
| 20% | 25.0% | $125 |
| 30% | 42.9% | $143 |
| 40% | 66.7% | $167 |
| 50% | 100.0% | $200 |
What is a good profit margin?
The honest answer is that it depends on your model far more than on your management. Rules of thumb we find useful when reviewing a new client's books:
- Professional services: gross 70–90%, net 15–25%. Direct cost is labor, so utilization drives everything.
- Trades and construction: gross 20–35%, net 5–12%. Job-level costing matters more than the company total.
- Retail and e-commerce: gross 30–50%, net 2–8%. Shipping, returns, and ad spend move net more than pricing does.
- Restaurants: gross 60–70%, net 3–9%. Food cost sets gross; labor and rent set net.
- Medical and dental: gross 55–75%, net 10–20%. Contractual write-offs must be recorded separately from collections.
These are working ranges from the books we see, not results of a formal survey. The more useful comparison is against yourself: is your net margin stable or improving over the last six months, and does it cover debt service with room left?
Three reasons your margin is wrong
Direct costs are buried in overhead
If subcontractor payments, materials, or merchant fees are coded to general expenses instead of COGS, your gross margin is overstated and you cannot tell whether pricing works. This is the single most common chart-of-accounts problem we fix in a cleanup.
The owner works for free
A margin calculated without paying yourself a market wage for the work you actually do is not a margin. If you are the technician and the salesperson, your P&L should carry the cost of replacing you. Otherwise you are subsidizing the business and calling it profit.
Loan principal is treated as an expense
Principal repayment reduces cash and a liability, but never touches the P&L. Only interest does. Owners who subtract the whole loan payment from profit understate margin; owners who ignore debt service entirely overestimate how much more they can borrow.
Margin is not cash
You can post a 20% net margin and still not make payroll. Margin is an accrual measure; cash is a timing measure. The gap comes from unpaid invoices, inventory bought ahead of sales, loan principal, and owner draws.
That gap is the most common reason a profitable business fails, which is why we pair every margin review with a forecast. Our cash flow calculator and 13-week forecast handle that side.
Do the math on your own numbers
Open the profit margin calculator, enter one month of revenue and costs, and you will get all three margins plus the revenue required to hit a target. If the result looks implausible for your industry, the problem is usually the books rather than the business — and that is fixable. Tell us where your books stand and we will tell you what it takes to get a margin you can trust.
Popular tools & nearby service areas
- Bookkeeping in Klein, TXMonthly bookkeeping and cleanup for Klein and north Harris County businesses.Learn more
- Bookkeeping in Jersey Village, TXLocal support for contractors, clinics, and shops along US-290.Learn more
- 13-week cash flow forecast toolFree rolling forecast to see payroll and tax gaps a quarter ahead.Learn more