Margin Calculator

The margin calculator finds gross profit margin, revenue, or cost of goods sold. Select what you want to solve for, enter the known values, and the calculator displays the result. Margin shows what percentage of every sales dollar is profit after direct product costs.

What to solve for
Total sales
Direct product cost
Gross profit 40.00
Margin result 40.00%

Margin formulas

Gross Profit Margin % = ((Revenue - COGS) / Revenue) × 100
Gross Profit = Revenue - COGS
Revenue = COGS / (1 - Margin % / 100)
COGS = Revenue × (1 - Margin % / 100)

How to use this calculator

  1. Select what you want to find: margin %, revenue, or cost.
  2. Enter the known values for the other two fields.
  3. The calculator solves for your selected variable.
  4. Gross profit is shown for reference.

Margin is not markup

The most expensive arithmetic mistake in small business is treating margin and markup as the same thing. Markup measures profit against cost; margin measures profit against the selling price. A product that costs 60 and sells for 100 carries a 40 percent margin but a roughly 67 percent markup, because the same 40 of profit is a larger fraction of the smaller cost than of the larger price.

Confuse the two and you underprice systematically. Aiming for a 40 percent margin but applying a 40 percent markup leaves you with only about 29 percent margin, a shortfall that repeats on every sale and quietly drains the business. The safe habit is to decide the margin you need to cover overheads and profit, then derive the price from it (price equals cost divided by one minus the margin), rather than adding a markup percentage to cost and hoping it is enough. Keep the two words straight and you protect the number that actually keeps the lights on.

Margin calculator: frequently asked questions

What is gross profit margin?

Gross profit margin = (Revenue - Cost of Goods Sold) / Revenue * 100%. It shows what percentage of sales is profit after direct product costs.

How is margin different from markup?

Markup is based on cost; margin is based on revenue. Margin is always lower than the equivalent markup percentage. Example: 50% markup = 33% margin.

What is a good margin?

It varies by industry. Retail: 20-40%. Services: 40-60%. Technology: 60-80%. Check your industry benchmarks for context.

Can I solve for any variable?

Yes, this calculator lets you find revenue, cost of goods sold, or margin %. Enter the other two values.

What is COGS?

Cost of goods sold (COGS) is the direct cost to produce goods. It includes materials and direct labor but not overhead like rent.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.