Skip to content
Calculator Collection

Profit Margin Calculator

Compute the gross profit margin as a percentage from total revenue and total costs. Returns the proportion of each revenue dollar that remains as profit after costs.

Last updated: May 2026

Fill in the required fields to see your result.

Compare with similar

About this calculator

The formula is Profit Margin (%) = ((Revenue − Costs) / Revenue) × 100. The numerator (Revenue − Costs) is gross profit; dividing by Revenue normalises it as a percentage of sales. The output represents the share of each revenue dollar remaining as profit after the included costs. Which 'margin' this represents depends on what 'costs' contain: if Costs = COGS (cost of goods sold), the result is gross margin; if Costs = COGS + operating expenses, the result is operating margin; if Costs = total expenses including taxes and interest, the result is net margin. Each margin level tells a different story: gross margin shows pricing power vs direct costs (typically 20–80% for product businesses, much higher for software where COGS is near zero), operating margin shows efficiency of operations (typical 5–25%), net margin shows what's left for shareholders (typical 5–15%). Edge cases: revenue = 0 produces division by zero. Negative revenue (refunds exceeding sales) is nonsensical. If Costs > Revenue the result is negative (loss); this is normal for early-stage startups but unsustainable long-term. Margins vary enormously by industry: software companies often run 70–90% gross margins; consumer-goods 20–40%; commodity manufacturers 10–20%; grocery retail 1–3%. Comparing margins across industries without context is misleading; comparing within the same industry or to historical norms is much more informative.

How to use

Example 1 — typical product business. Revenue $100,000, Costs $70,000. Step 1: gross profit = 100,000 − 70,000 = $30,000. Step 2: divide: 30,000 / 100,000 = 0.30. Step 3: × 100 = 30%. Verify: a 30% gross margin is healthy for many product businesses — every dollar of revenue contributes 30 cents toward operating expenses, taxes, and profit ✓. To get from 30% gross margin to net margin, you'd subtract operating expenses (rent, salaries, marketing, R&D), interest, and taxes — typical net margin lands at 5–15% depending on industry. Example 2 — software business with low costs. Revenue $500,000, Costs $50,000 (mostly hosting and payment processing). Step 1: gross profit = 500,000 − 50,000 = $450,000. Step 2: divide: 450,000 / 500,000 = 0.90. Step 3: × 100 = 90%. Verify: 90% gross margin is typical for SaaS and software products, where the cost of serving one more customer is near zero. This high gross margin is why software businesses can support significant operating expenses (engineering, sales, marketing) while still ending with healthy net margins of 15–25% at scale. The high gross margin is also why SaaS valuations are often 5–15× revenue, while product-business valuations are 1–3× revenue — investors pay more for each dollar of high-margin recurring revenue ✓.

Frequently asked questions

What's the difference between gross, operating, and net margin?

Three layers of subtractions from revenue. Gross margin = (Revenue − COGS) / Revenue: tells you pricing power vs direct costs of producing the good or service. Operating margin = (Revenue − COGS − operating expenses) / Revenue: tells you operational efficiency including overhead, R&D, sales, marketing, and depreciation. Net margin = (Revenue − all expenses including interest and taxes) / Revenue: tells you what's left for shareholders. Each level peels back another layer of cost. Gross margin is the most directly under management's control through pricing and supply-chain decisions; operating margin reflects management's control of fixed costs and scale efficiencies; net margin includes capital structure (interest expense) and tax planning, which are partially outside operational control. A company might have a 50% gross margin but 5% net margin if operating expenses, interest, and taxes consume the difference. For comparing companies, EBITDA margin (earnings before interest, taxes, depreciation, amortisation) is often used to control for capital-structure and tax differences and focus on operational performance.

What's a 'good' profit margin?

Industry-dependent. Software/SaaS: 70–90% gross, 15–25% net. Pharmaceuticals: 60–80% gross, 15–25% net. Consumer staples (P&G, Coca-Cola): 40–55% gross, 10–20% net. Apparel and consumer goods: 30–50% gross, 5–15% net. Manufacturing (auto, appliances): 20–30% gross, 5–10% net. Grocery retail (Kroger, Walmart): 20–25% gross, 1–3% net — high volume, low margin. Restaurants: 60–70% gross before labour, 5–10% net. Construction: 5–15% gross, 1–5% net. Energy and commodities: highly cyclical, 0–30% net depending on prices. The 'right' margin depends on capital intensity, competitive structure, growth stage, and strategy. Tech startups often run negative net margins for years while building scale (Amazon famously didn't post material profits for 20+ years), justified by future scale economics. Mature companies in competitive industries have low margins but high volume. For evaluating any specific business, compare to industry peers and to historical trends rather than to absolute benchmarks.

How does pricing affect margin, and what's the math of discounting?

Margin is highly sensitive to price changes because the entire price change goes to or comes from profit. Example: a business with 40% gross margin at $100 price (COGS $60). Raising price 10% to $110 with no volume change pushes margin to ($110 − $60)/$110 = 45.5%. Cutting price 10% to $90 cuts margin to ($90 − $60)/$90 = 33.3%. The percentage-point margin change is roughly 1.5–2× the percentage price change for typical margins. Discounting math is treacherous: offering a '10% off' coupon at 40% margin doesn't just cut margin to 30% — it cuts gross profit per unit by a quarter (from $40 to $30), so you need 33% more volume just to maintain total gross profit. At 20% margins, a 10% discount halves gross profit per unit and you need 100% more volume. This is why retailers chase volume desperately during sales — but only chronically high-margin businesses can sustain frequent discounting without destroying profitability. Conversely, raising prices is the highest-leverage profitability move available to most businesses; a 1% price increase fully transmitted to the bottom line raises operating profit by typically 8–12% for a company with 10% margins.

What are the common mistakes when calculating profit margins?

The biggest mistake is conflating gross, operating, and net margin — they tell very different stories and need to be compared at the same level. The second is using markup instead of margin: markup is (Revenue − Cost) / Cost, not / Revenue. A 50% markup is only 33% margin; a 100% markup is only 50% margin. Confusing the two leads to chronic under-pricing in retail, especially for new entrepreneurs. The third is omitting indirect costs from COGS when comparing across companies; some include shipping, warehousing, and customer service in COGS while others put them in operating expenses, making direct gross-margin comparisons unreliable. People also use list price instead of net price — discounts, returns, and refunds reduce realised revenue, and accounting for them as 'sales contra-revenue' rather than just smaller revenue distorts margins. Mixing periods is another error: comparing this month's revenue to year-to-date costs gives nonsense. For SaaS, subscription revenue vs upfront-recognised revenue have very different accounting; verify the recognition method before comparing margins.

When should I not use this calculator?

Do not use it to compare profitability across industries without industry-specific context — margins vary 10–100× across industries, so a 5% net margin is fine for a grocer but terrible for a SaaS company. It is not appropriate for evaluating capital-intensive businesses without considering capital expenditure and depreciation; airlines and utilities can show positive operating margins while losing money on a cash-flow basis after capex. Do not use it as the sole profitability metric — return on invested capital (ROIC), return on equity (ROE), and free cash flow margin give complementary perspectives. It is not suitable for early-stage startups losing money intentionally to capture market share; gross margin matters there but net margin is usually misleading. The formula assumes revenue and costs are in the same currency and time period; mixed-currency or mixed-period inputs give nonsense. Avoid using it to value businesses without considering growth, scale economics, and competitive moats; high current margins in a commoditising industry will compress, while low current margins in a scaling SaaS business will expand. Finally, don't use list-price margin if your business actually realises lower prices through discounting, channel partner cuts, or returns — use actual net revenue.

Sources & references