Skip to content
ToolsLeb ToolsLeb

Gross Margin Calculator

Calculate gross profit and gross margin percentage.

Simple Calculators

Calculator Inputs

$
$

Your Result

Enter your details and press Calculate to see your result.

Formula

Gross Profit = Revenue − Cost of Goods Sold
Revenue Total sales revenue.
Cost of Goods Sold Direct costs of producing what you sold.
Gross Margin Percent = ((Revenue − Cost of Goods Sold) ÷ Revenue) × 100
Revenue Total sales revenue.
Cost of Goods Sold Direct costs of producing what you sold.

How it works

  1. Enter your total revenue.
  2. Enter your cost of goods sold (COGS).
  3. View your gross profit and gross margin percentage.

Share on Social Media:

Gross margin is the share of revenue left after paying the direct cost of what you sold. Enter revenue and cost of goods sold (COGS) to get gross profit and gross margin.

Formulas and example

  • Gross profit = Revenue − COGS
  • Gross margin = Gross profit ÷ Revenue × 100

Revenue $100,000, COGS $60,000: gross profit $40,000, gross margin 40%.

What goes into COGS?

Direct costs of producing or buying what you sold: materials, inventory purchases, direct labour and manufacturing overheads. Not rent for offices, marketing or admin salaries; those are operating expenses, which come out later and affect net margin.

Margin vs markup

MeasureFormulaSame product
MarginProfit ÷ Selling price$40 profit on a $100 sale = 40%
MarkupProfit ÷ Cost$40 profit on a $60 cost = 66.7%

Confusing the two is a common pricing mistake: a 40% markup gives only a 28.6% margin.

Typical gross margins

They vary hugely: grocery retail often runs at 20–30%, while software can exceed 70–80%. Compare yourself with your own industry.

Related calculators

Frequently Asked Questions

Gross margin only subtracts the direct cost of producing what you sold (COGS). Net margin subtracts all expenses, including operating costs, interest, and taxes — see the Net Margin Calculator.

Gross Margin % = (Revenue − COGS) / Revenue × 100, where COGS is the Cost of Goods Sold.

COGS includes the direct costs of producing what you sold — raw materials, direct labor, and manufacturing overhead — but excludes indirect costs like marketing, rent, or administrative salaries.

It varies enormously by industry — software companies often see 70-90% gross margins, while retailers and manufacturers commonly run 20-40%, so compare against similar businesses in your sector rather than a fixed benchmark.