Formulas   Updated May 2026 · 7 min read

How to Calculate Gross Profit Margin

Gross profit margin is the single clearest measure of whether your pricing works. It takes two numbers and one formula — here is exactly how to calculate it, with examples.

The Gross Profit Margin Formula

It is a two-step calculation: find gross profit, then turn it into a percentage of revenue.

Gross Profit = Revenue − Cost of Goods Sold (COGS)
Gross Profit Margin (%) = (Gross Profit ÷ Revenue) × 100

Step 1: Find Revenue

Revenue is the total selling price of what you sold. For a single product it is just the selling price; for a period it is total sales.

Step 2: Find Cost of Goods Sold (COGS)

COGS is the direct cost of producing what you sold: raw materials, direct labour, and manufacturing/purchase cost. It excludes indirect costs like marketing, rent, admin salaries and software — those belong to net profit, not gross.

Step 3: Calculate Gross Profit

Subtract COGS from revenue. If you sold $100,000 of product that cost $62,000 to make or buy, gross profit is $38,000.

Step 4: Convert to a Margin Percentage

Divide gross profit by revenue and multiply by 100: $38,000 ÷ $100,000 × 100 = 38%. That is your gross profit margin.

RevenueCOGSGross ProfitGP Margin %
$100$60$4040.0%
$100$75$2525.0%
$250$150$10040.0%
$1,000$620$38038.0%

Gross profit margin is always calculated on revenue (selling price), never on cost. Profit over cost is markup — a different, larger number explained in our margin vs markup guide.

Gross Margin vs Net Margin

Gross margin stops at direct costs. Net margin keeps going and subtracts every other expense — operating costs, interest, tax. Gross margin tells you if your pricing and product economics work; net margin tells you if the whole business is profitable. Always start with gross.

What Counts as a Good Result?

It is entirely industry-dependent — software can exceed 80%, grocery survives on 10–15%. Don't judge your number in isolation; compare it to your sector in what is a good gross profit margin and gross profit margin by industry.

Calculate it instantly

Skip the manual math — enter cost and revenue and get gross profit and margin in real time.

Open the Margin Calculator

Frequently Asked Questions

How do you calculate gross profit margin?

+

Subtract cost of goods sold from revenue to get gross profit, divide by revenue, then multiply by 100. For $100 revenue and $60 COGS: ($40 ÷ $100) × 100 = 40%.

What is the gross profit margin formula?

+

Gross Profit Margin % = ((Revenue − COGS) ÷ Revenue) × 100. Gross profit is revenue minus the direct cost of goods sold.

What is included in COGS?

+

COGS includes direct costs: raw materials, direct labour, and manufacturing or purchase cost. It excludes indirect costs like marketing, rent and administrative salaries.

What is the difference between gross and net profit margin?

+

Gross margin subtracts only direct product costs. Net margin subtracts all expenses including operating costs, interest and tax, so net margin is always lower.

Is gross profit margin calculated on cost or revenue?

+

On revenue (selling price). Calculating profit as a percentage of cost gives markup, which is a different and larger figure.

This guide is general business education, not financial or accounting advice. Margin norms vary by industry, region and business model — always validate against your own figures and a qualified advisor where needed.

Next guideWhat Is a Good Gross Profit Margin? → Back toAll guides