Profit margin calculator

Enter revenue and COGS to see gross profit and gross margin. Add operating expenses for operating margin, and a tax rate for net margin. The markup percentage is calculated automatically.

Input method
Total net sales for the period.
Direct costs to produce or deliver your product or service (materials, direct labor).
Optional. SG&A, rent, salaries, marketing — expenses beyond COGS. Shows operating profit.
Optional. Effective tax rate on operating profit. Shows net profit after tax.

Your results

Gross profit$40,00040.00% gross margin · 66.67% markup
Revenue / selling price
$100,000
COGS
$60,000
Markup
66.67%
Gross margin
40.00%

Estimate only, not financial, tax or legal advice. Check your own figures and contract before relying on it.

The three levels of profit margin

Profit margin is not a single number — a business's income statement has three distinct profit lines, each revealing something different about operational efficiency and cost structure.

Gross profit margin

Gross profit = revenue − cost of goods sold (COGS)

Gross margin = gross profit ÷ revenue

COGS includes the direct costs to produce or deliver what you sell: raw materials, component parts, direct labor, and the cost of merchandise purchased for resale. Gross margin tells you how much of each sale dollar is left after covering those direct costs, before paying any overhead.

Markup vs. gross margin

Markup and gross margin measure the same spread between cost and price, but divide by different denominators — a common source of confusion:

MetricFormulaBased on
Gross margin %(price − cost) ÷ priceRevenue (selling price)
Markup %(price − cost) ÷ costCost

A 40% gross margin and a 66.7% markup describe the same product: one sold for $10 that costs $6. Markup is always higher than gross margin for the same product because the denominator (cost) is smaller than the denominator used for margin (price).

Operating profit margin

Operating profit = gross profit − operating expenses

Operating margin = operating profit ÷ revenue

Operating expenses (opex) include rent, salaries not in COGS, utilities, marketing, and depreciation. Operating margin shows profitability from core operations before financing costs and taxes.

Net profit margin

Net profit = operating profit − taxes

Net margin = net profit ÷ revenue

This calculator applies the tax rate only to positive operating profit. Losses are not taxed (a tax credit or loss carryforward is not modeled here). Enter your effective tax rate — the actual percentage you pay, not the marginal rate — for the most accurate result.

Advertisement

Worked examples

Example 1 — retail shop: A hardware store has $500,000 in annual revenue. COGS (wholesale merchandise) is $300,000. Operating expenses (rent, staff, utilities) are $120,000. Effective tax rate is 22%.

ItemAmountMargin
Revenue$500,000—
COGS$300,000—
Gross profit$200,00040.00% (markup 66.67%)
Operating expenses$120,000—
Operating profit$80,00016.00%
Tax (22%)$17,600—
Net profit$62,40012.48%

Example 2 — software business: A SaaS company has $1,200,000 in annual revenue. COGS (hosting, support staff) is $180,000 — a 85% gross margin typical for software. Operating expenses are $600,000 (sales, marketing, engineering overhead). Effective tax rate is 25%.

ItemAmountMargin
Revenue$1,200,000—
COGS$180,000—
Gross profit$1,020,00085.00%
Operating expenses$600,000—
Operating profit$420,00035.00%
Tax (25%)$105,000—
Net profit$315,00026.25%

The contrast illustrates why gross margin matters: both companies might have similar net margins, but the SaaS business has far more flexibility because its gross margin is twice as high, leaving more room to invest in growth or weather a revenue dip.

Assumptions and limitations

  • COGS definition varies by industry. For manufacturers it includes materials, direct labor, and factory overhead. For retailers it is the wholesale cost of goods sold. For service businesses it is the direct cost of service delivery (hours billed at cost, subcontractors). Consistency matters more than the exact definition — use the same method every period so margins are comparable over time.
  • Operating expenses do not include interest or taxes. This calculator computes operating profit (EBIT) — earnings before interest and taxes. If your business carries debt, interest expense would reduce net income further beyond what is shown here.
  • Tax is applied only to positive operating profit. Net operating losses, tax credits, carryforwards, and deferred tax assets are not modeled. Consult a CPA for your actual tax liability.
  • The calculator uses a single period (a month, quarter, or year — your choice). It does not project multi-period growth or changes in cost structure.

Frequently asked questions

What is a good gross margin for a small business?
It depends heavily on the industry. Software and professional services typically run 60–85% gross margins. Retail is often 30–50%. Restaurants and food service commonly run 60–70% on food costs alone but have high labor overhead. Manufacturing and construction typically run 20–40%. The most useful benchmark is your own historical trend and direct competitors, not a cross-industry average.
Why is my markup percentage higher than my gross margin?
Because they divide by different numbers. Markup divides the profit by cost; gross margin divides the same profit by revenue. Since cost is always less than revenue, markup is always larger. A 50% markup means you added half of cost on top; the resulting gross margin is 33.3%, not 50%. Many pricing mistakes come from confusing the two — always confirm which one your supplier or accounting software is quoting.
What's the difference between gross margin and contribution margin?
Gross margin subtracts COGS (direct production costs). Contribution margin subtractsvariable costs — a slightly different cut. For most businesses they are similar, but contribution margin also removes variable sales commissions and variable overhead that COGS accounting would classify differently. Contribution margin is the right metric for break-even analysis; gross margin is the right metric for comparing industry benchmarks and tracking production efficiency. Use the break-even calculator for contribution margin analysis.
How do I improve my profit margins?
Three levers: (1) raise prices — a 1% price increase with no volume loss goes straight to gross profit; (2) reduce COGS — negotiate better supplier terms, improve yields, reduce waste; (3) reduce operating expenses — but be careful not to cut investments (marketing, product quality) that drive revenue. Gross margin improvement is generally more durable than opex cuts because it scales with revenue.
Advertisement

Sources

  1. Investopedia — "Profit Margin: Meaning, Types, Formula, and Impact" (accessed 2026-10-04)
  2. Corporate Finance Institute — "Gross Margin vs. Gross Profit" (accessed 2026-10-04)
Advertisement