PK Systems PK Systems
Finance

Profit Margin Calculator

Calculate gross margin, markup, and the price you'd need to charge to hit a target margin.

Profit Margin Calculator

Set how many you sold to see total profit. Default is 1.

Gross profit margin

Fill in the form to see your margin.

What is profit margin?

Profit margin is the share of every sale that you keep after paying the cost of what you sold. If a coffee shop sells a latte for $5 and the milk, beans, cup, and sleeve cost $1.50, the gross profit is $3.50 and the gross margin is 70%. Margin is expressed as a percentage of revenue, which makes it directly comparable across price points and currencies — a 30% margin on a $10 product and a 30% margin on a $1,000 product are the same business reality, just at different scales. Markup is a different number for the same trade: it's the profit divided by the cost rather than the revenue. A 30% margin is a 43% markup; a 50% margin is a 100% markup; the gap widens at higher margins. Both are useful — margin is what your accountant cares about, markup is what you mentally add to a cost when you're pricing on the fly. This calculator handles both directions of the math: the forward mode (you know cost and revenue, find the margin) is everyday accounting, and the reverse mode (you know cost and target margin, find the price you should charge) is everyday pricing. It's gross margin only — operating expenses, marketing, taxes, and shipping aren't included. Use it to set list prices, evaluate freelance gigs, or sanity-check a wholesale offer.

How to use it

  1. Pick a mode — Forward mode answers "what's my margin?" given a cost and a price. Reverse mode answers "what should I charge?" given a cost and a target margin.
  2. Enter the cost per unit — Include all variable costs that scale with each unit sold: materials, packaging, payment processing, shipping if you absorb it.
  3. Enter the revenue or target — In forward mode, enter the selling price (or revenue per unit). In reverse, enter the margin you want — e.g. 40 for a 40% gross margin.
  4. Optional: total it across units — Forward mode lets you enter the number of units sold to project total profit. Useful for batch sales or projecting a launch.

The formulas

Margin and markup answer different questions about the same gross profit number. Both are linear; both are easy to invert.

Gross margin: margin% = (revenue − cost) / revenue × 100

Markup: markup% = (revenue − cost) / cost × 100

Target price: price = cost / (1 − margin%/100)

These formulas use gross figures only — they don't account for operating expenses, fixed overhead, or taxes. For full P&L analysis, deduct those from the gross profit total.

Typical gross margins by industry

Margins vary wildly by industry. The list below is a rough sanity check, not a target. Within an industry, scale, brand power, and operational efficiency move the number significantly.

Industry Typical gross margin
Grocery / supermarket1 – 3%
Full-service restaurant3 – 9%
General retail5 – 15%
E-commerce (physical goods)10 – 25%
Software & digital products15 – 40%
Consulting / freelance services20 – 50%

Frequently asked questions

What's the difference between margin and markup?
Margin is profit divided by revenue (selling price). Markup is profit divided by cost. A 50% markup gives a 33% margin; a 100% markup gives a 50% margin. They describe the same dollar profit but answer different business questions, and confusing them is a common pricing error.
Is this gross margin or net margin?
Gross margin — revenue minus the direct cost of goods sold (COGS). Net margin subtracts everything else: operating expenses, marketing, rent, salaries, taxes. Gross margin is what you control at the unit level; net margin is what shows up at the bottom of the income statement.
What margin should I aim for?
Whatever your industry sustains plus a buffer for operating expenses. A 10% gross margin is fatal in software but normal in groceries. As a rule of thumb, your gross margin must be high enough to cover all operating costs and still leave a net profit you're satisfied with.
Does this work for service businesses?
Yes. For services, "cost" is whatever it costs you to deliver one unit — your time at a fair hourly rate, software subscriptions used, sub-contractor fees, etc. "Revenue" is what you charge. The same math applies.
What happens if I enter a target margin of 100% or more?
Mathematically impossible — a 100% margin would require infinite price (you can never make 100% of revenue as profit if your cost is greater than zero). The calculator caps the target below 100% and ignores invalid inputs.
Why is my margin negative?
Your selling price is lower than your cost — you're losing money on every sale. Either raise the price, reduce the cost, or stop selling that item. Loss-leaders sometimes make sense (driving traffic, bundling), but only when the loss is offset elsewhere.