SdzxgFormula Gross Margin

Formula Gross Margin

Gross margin shows how much of each sale is left after paying for what you sold — before rent, salaries and other overheads. The formula is simple, (revenue − cost of goods sold) ÷ revenue, but the useful questions come after: which products pull the average down, why the margin moved between periods, and what price would hit your target. This calculator answers all three.

Gross margin calculator

Gross Margin Analysis Pack

Excel gross margin workbook (by product and by month), a pricing-for-margin sheet, a margin bridge worksheet and a quick reference card.

Formats: XLSX, PDF. Instant download after payment (link valid 72 hours, up to 5 downloads). AI-assisted: the templates were drafted with AI help and reviewed and laid out before publishing.

$3.00 USD, one-time 4 files · about $0.75 each

7-day money-back guarantee. Full refund within 7 days of purchase, even after you download.

Free sample: Gross Margin by Month (PDF, 58 KB)

Full refund within 7 days — see the refund policy and license.

Free printables

Single sheets you can print right now, no sign-up. The full pack adds every sheet in one download plus the editable files.

Browse the free printables →

The gross margin formula

MeasureFormula
Gross profitRevenue − cost of goods sold (COGS)
Gross margin %Gross profit ÷ revenue × 100
COGS ratioCOGS ÷ revenue × 100 (= 100% − gross margin)
Price for a target marginUnit cost ÷ (1 − target margin)
Markup on costGross profit ÷ COGS × 100

Revenue here means net sales — after returns, discounts and allowances. Using gross (list-price) sales overstates the margin.

What goes into cost of goods sold

BusinessUsually in COGSUsually not in COGS
RetailPurchase cost of stock, inbound freight, shrinkageStore rent, sales staff, marketing
ManufacturingRaw materials, direct labour, factory overheadsHead office, sales and marketing, R&D
RestaurantFood and drink ingredients (often also direct kitchen labour)Rent, front-of-house staff, utilities
Software / SaaSHosting, third-party licences, customer supportProduct development, sales, general admin
ServicesDirect labour on client work, subcontractorsBusiness development, admin staff

Classification rules differ between companies and accounting frameworks, so margins are only comparable when costs are treated the same way. Check how your accountant classifies costs before benchmarking.

Worked example: a small coffee business

A roaster sells three lines in a quarter: coffee beans ($42,000 revenue, $25,200 COGS), brewing equipment ($18,000, $13,500) and workshops ($6,000, $1,800). Total revenue is $66,000 and COGS $40,500, so gross profit is $25,500 and the gross margin is 38.6%. Beans run at 40%, equipment at only 25% and workshops at 70%. Last quarter’s margin was 37.0% on $60,000 of sales, so the margin rose 1.6 points: of the $3,300 increase in gross profit, about $2,220 came from higher sales volume (at last quarter’s margin) and about $1,080 from the better margin on this quarter’s sales. To earn a 45% margin on a bag of beans costing $12.50, the price must be $12.50 ÷ 0.55 = $22.73.

Gross, operating and net margin

MarginFormulaWhat it tells you
Gross margin(Revenue − COGS) ÷ revenueProfitability of what you sell
Operating marginOperating income ÷ revenueAfter running costs such as rent, salaries and marketing
Net marginNet income ÷ revenueAfter everything, including interest and tax
Contribution margin(Revenue − variable costs) ÷ revenueHow much each sale contributes to fixed costs

A business can have a healthy gross margin and still lose money if its operating costs are too high — gross margin is the first line of defence, not the whole story.

Typical gross margins vary by industry

Gross margins range widely: grocery retailing and fuel often have thin margins, while software and many services can have high ones, because their cost of delivering one more unit is low. Rather than chasing a generic benchmark, compare against businesses with a similar model and cost classification, and track your own trend over time.

Reading the period comparison

The calculator splits a change in gross profit into two parts. The volume effect is the extra revenue multiplied by the old margin — the profit you would have made from selling more at last period’s margin. The margin effect is this period’s revenue multiplied by the change in margin — the extra profit from each sale being more (or less) profitable. If gross profit rose but mostly through volume while the margin fell, costs may be rising faster than prices; if the margin rose while volume fell, a price increase may be costing customers. Both parts matter for decisions.

Gross margin and inventory

For businesses that hold stock, COGS depends on how inventory is valued — the cost of the specific items sold, first-in-first-out (FIFO) or weighted average cost. When purchase prices change, these methods produce different COGS and therefore different margins for the same sales. Write-downs for damaged or obsolete stock also increase COGS in many accounting treatments. Use the same method consistently when comparing periods.

Ways to improve gross margin

Privacy

All figures stay in your browser; nothing is uploaded.

Frequently asked questions

What is the gross margin formula?

(Revenue − cost of goods sold) ÷ revenue × 100.

What is the difference between gross profit and gross margin?

Gross profit is an amount of money; gross margin is that amount as a percentage of revenue.

How do I price for a 40% margin?

Divide the cost by 0.6: a $30 cost needs a $50 price.

Is margin the same as markup?

No — margin is profit ÷ price, markup is profit ÷ cost. A 50% markup is a 33.3% margin.

What is a good gross margin?

It depends on the industry and business model; compare with similar businesses and your own history.

Are my numbers saved?

No. They stay in your browser.

Should shipping costs be in COGS?

Inbound freight to get stock is usually in COGS; outbound shipping to customers is often treated separately — follow your accountant’s approach.

Can gross margin be negative?

Yes, if goods sell for less than they cost; it’s a warning sign for pricing or costs.

How often should I check gross margin?

Monthly is common for small businesses, with a closer look whenever supplier prices change.

Does gross margin include labour?

Only direct labour used to make or deliver the product, depending on how your business classifies costs.