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 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.