Home » Finance Formulas with Calculators » Gross Profit Margin Formula

Gross Profit Margin Formula

Home › Finance Formulas › Gross Profit Margin Formula

Gross Profit Margin Calculator

Gross profit margin is the percentage of revenue left after paying the direct costs of producing or buying what was sold. Gross profit is revenue minus cost of goods sold (COGS); dividing it by revenue gives the margin. It shows how much each sale contributes toward operating expenses, interest, tax and profit.

Formula

Gross margin = Revenue − Cost of goods soldRevenue × 100%

Where

Revenue
net sales for the period
Cost of goods sold
direct costs of the goods or services sold (materials, direct labour)

Calculator

Result and step-by-step solution

Gross profit margin
40%

Gross profit 200,000.00: 0.40 of every 1.00 of sales is left after direct costs.

  1. Gross profit
    500,000.00 − 300,000.00 = 200,000.00
  2. Divide by revenue
    200,000.00500,000.00 = 40%

How to use the formula

Cost of goods sold includes materials, direct labour and manufacturing overhead for a producer, or the purchase cost of stock for a retailer. It does not include rent for offices, marketing or administrative salaries; those are operating expenses that appear in the operating margin.

With revenue of 500,000 and COGS of 300,000, gross profit is 200,000 and gross margin is 40%. Margins vary widely by industry, from under 20% for grocers to over 70% for software. Watching gross margin over time shows whether pricing power or input costs are changing. Gross margin is often confused with markup: a 40% margin corresponds to a 66.67% markup on cost, as the markup vs margin calculator shows. Online sellers can also try the site’s Shopify profit margin calculator.

Frequently asked questions

What is the gross profit margin formula?
Gross margin = (revenue − cost of goods sold) ÷ revenue × 100%.
What is included in cost of goods sold?
Direct costs of the products sold: materials, direct labour and production overhead, or the purchase cost for resellers.
What is a good gross margin?
It depends on the industry. Retail is often 20–50%, software and services 60–80%.
Is gross margin the same as markup?
No. Margin divides profit by the selling price; markup divides it by cost, so markup is always larger.

Last reviewed: September 26, 2026. Calculations run in your browser and were checked against numpy-financial, SciPy and published spreadsheet examples.

Scroll to Top