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.
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
- Select what you want to find: margin %, revenue, or cost.
- Enter the known values for the other two fields.
- The calculator solves for your selected variable.
- 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
- U.S. Small Business Administration: Business Planning.
Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.