Margin Calculator

FINANCE · PROFITABILITY

Calculate gross margin, markup & profit

Calculated on this device
Direct cost of goods sold or service delivery ($0 to $100,000,000).
Selling price or total revenue (greater than $0 up to $100,000,000).

GROSS MARGIN

25.00%

Gross Profit: $40.00 · Markup: 33.33%.

Formula Margin = (Revenue − Cost) ÷ Revenue × 100

Gross Profit$40.00Revenue − Cost
Gross Margin25.00%Profit ÷ Revenue
Markup33.33%Profit ÷ Cost
Cost / Revenue$120.00 / $160.00Unit economics

HOW IT WORKS

Gross margin vs. markup formulas

Gross profit margin and markup both measure the difference between your selling price (revenue) and your cost of goods sold—but margin divides profit by revenue, whereas markup divides profit by cost.

01

From Cost & Revenue

Compute gross profit Profit = Revenue − Cost, then divide by revenue for margin and by cost for markup:

Margin = (Profit ÷ Revenue) × 100 · Markup = (Profit ÷ Cost) × 100
02

Selling Price from Target Margin

To hit a desired gross margin percentage M (where M < 100%) from unit cost C:

Revenue = Cost ÷ (1 − M ÷ 100)
03

Selling Price from Target Markup

To apply a markup percentage K (where K ≥ −100%) on top of unit cost C:

Revenue = Cost × (1 + K ÷ 100)

PRICING GUIDE

Setting profitable retail and service prices

Why margin is always lower than markup (for positive profit)

Because selling price is larger than cost whenever you make a profit, dividing the same Gross Profit by Revenue yields a smaller percentage than dividing by Cost. For example, doubling your cost (a 100% markup) produces a 50% gross margin. A 25% markup produces a 20% gross margin.

Avoiding the common markup-vs-margin pricing mistake

If your business targets a 30% gross margin on a $100 product, adding 30% to cost ($130) only gives you a 23.08% margin. Use Cost & Margin mode to divide $100 ÷ (1 − 0.30) and arrive at the true $142.86 selling price.

Related pricing, discount, and tax tools

Planning a promotional markdown? Check how a sale affects final price in the Discount Calculator. You can also add local checkout tax with the Sales Tax Calculator, or evaluate capital returns in the ROI Calculator.

Frequently asked questions

Why can't gross margin be 100% or higher when cost is positive?

Because Margin = (Revenue − Cost) ÷ Revenue, a 100% margin is only possible if Cost is $0. If Cost is greater than $0, Revenue would have to be infinite to reach 100% margin.

What happens if I sell an item below cost?

If Revenue is less than Cost, Gross Profit, Gross Margin, and Markup all become negative (for example, $160 cost and $120 revenue yields −$40.00 profit, −33.33% margin, and −25.00% markup).

How do I convert markup to gross margin quickly?

Use Margin = Markup ÷ (1 + Markup) (in decimal form). For instance, a 50% markup (0.50) equals 0.50 ÷ 1.50 = 33.33% gross margin.

Is gross margin the same as net profit margin?

No. Gross margin only subtracts direct Cost of Goods Sold (COGS) from revenue. Net profit margin also deducts rent, payroll, marketing, interest, and taxes.

Your cost and margin figures are calculated locally in this browser and are never sent to a server.