Profit Margin Calculator
This profit margin calculator converts your revenue and costs into the margin percentages that actually matter: gross margin on direct costs and net margin after operating expenses. It also shows the markup equivalent of your gross profit, so you can stop confusing the two. Use it monthly to track whether discounts, fee changes or cost increases are eating your margins.
Total sales for the period, before any costs are subtracted.
Direct costs of what you sold: materials, manufacturing, inbound freight.
Indirect costs: software, rent, marketing, fees — everything beyond COGS.
Net profit margin
30%
- Gross profit
- 40
- Gross margin
- 40%
- Net profit
- 30
- Markup equivalentThe same gross profit expressed on cost instead of price — always higher than the margin.
- 66.67%
- Total costs
- 70
How it was calculated
- Gross profit: $100.00 − $60.00 = $40.00 → gross margin 40.0%.
- Net profit: $40.00 − $10.00 expenses = $30.00 → net margin 30.0%.
- Markup equivalent: $40.00 ÷ $60.00 = 66.7%.
How it works
Gross margin = (revenue − cost of goods sold) ÷ revenue × 100. It measures how much of each sales dollar survives direct product costs.
Net margin = (revenue − COGS − operating expenses) ÷ revenue × 100. It measures what survives everything — the bottom line of the period.
Markup = gross profit ÷ COGS × 100. Because markup divides by the smaller number (cost), it is always larger than the margin on the same sale — a 66.7% markup equals a 40% margin.
All three percentages describe the same profit; they differ only in the denominator. Pick one definition and use it consistently when comparing periods.
Worked examples
Online store month: $100k revenue, $60k COGS, $10k expenses
Gross profit = $40k → 40% gross margin. Net profit = $30k → 30% net margin. The markup equivalent is $40k ÷ $60k = 66.7% — the same profit sounds much bigger when quoted as markup.
Thin month: $80 revenue, $50 COGS, $40 expenses
Gross profit = $30 → 37.5% gross margin, which looks healthy. But net profit = −$10 → −12.5% net margin. The business lost money once operating expenses are counted — gross margin alone would have hidden it.
How to measure
- Use a full month (or quarter) of real revenue, not a good week extrapolated — margins swing with sales mix.
- Put every direct product cost in COGS: materials, manufacturing, inbound freight, packaging.
- Keep owner salary in operating expenses if you pay yourself a wage; otherwise note that net margin flatters reality.
- Separate one-off costs (a bulk equipment buy) from recurring expenses before judging the trend.
- Compare the same period year over year — seasonality moves margins more than most sellers expect.
Assumptions & limitations
Planning estimate
- Taxes are excluded; net margin here is pre-tax unless your expenses already include tax payments.
- Results are only as honest as the cost split — misclassified expenses move profit between gross and net.
- This is a planning and tracking estimate, not accounting or tax advice.
Frequently asked questions
Margin divides profit by the selling price; markup divides profit by the cost. On a $100 sale with $60 cost, the margin is 40% but the markup is 66.7%. Sellers who price with a "40% markup" thinking it is a 40% margin end up with only a 28.6% margin — a costly mix-up.
It varies widely by category: many small stores aim for 30–50% gross margin and 10–20% net margin after all expenses. Compare against your own history first and similar sellers second — a "good" margin is one that covers overhead, taxes and reinvestment with room to spare.
Because operating expenses — software subscriptions, advertising, rent, payment fees — sit between them. A store with 45% gross margin and 12% net margin is spending 33% of revenue on operations, which is where most margin leaks hide.
Yes. If total costs exceed revenue for the period, the margin is negative — you lost money. Negative net margin with positive gross margin is common during heavy ad spend or expansion months; the fix is in expenses or pricing, not in the formula.
Use gross margin for pricing individual products, since it reflects direct product economics. Use net margin to judge the business as a whole. Pricing off net margin bakes overhead into every product, which distorts decisions on what to promote or discontinue.