Gross Margin Calculator

How much profit margin does your pricing strategy generate?

Calculate your gross margin percentage to understand how much profit you keep from each sale after covering direct costs.

Updated June 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Think of gross margin like keeping change after buying ingredients for a meal you sell. If you sell a sandwich for $10 and the bread, meat, and condiments cost $6, you keep $4 — a 40 percent gross margin. This leftover money must pay for everything else: your kitchen rent, your time, marketing, and profit.

The calculation divides gross profit (revenue minus direct costs) by total revenue, then multiplies by 100 for a percentage. Unlike net profit, gross margin ignores operating expenses like rent, salaries, and advertising. This makes it perfect for comparing the inherent profitability of different products or pricing strategies.

Businesses track gross margin because it reveals how much financial breathing room they have. A restaurant with 70 percent gross margin can afford higher rent than one with 30 percent margin. The higher your gross margin, the more mistakes and unexpected costs your business can absorb without losing money.

When To Use This
Right tool, right situation

Use gross margin calculations when setting product prices, evaluating product profitability, or comparing different revenue streams. It is essential for businesses with physical products, manufacturing, or significant direct costs that vary with sales volume.

Gross margin analysis works best for operational decisions like supplier negotiations, product mix optimization, and pricing strategy. It helps identify which products subsidize others and where cost reduction efforts should focus. Retailers use it to evaluate different suppliers and manufacturers use it to assess production efficiency.

Avoid relying on gross margin for overall business health or cash flow analysis. Service businesses with minimal direct costs may find gross margin less meaningful than operating margin. Also avoid using gross margin to compare companies in different industries, where cost structures and business models vary dramatically.

Common Mistakes
Why results sometimes look wrong

The most common mistake is including operating expenses in cost of goods sold, which artificially lowers gross margin and obscures pricing decisions. Rent, marketing, and administrative salaries are operating costs, not production costs. This error makes profitable products appear unprofitable and leads to unnecessary price increases.

Another frequent error is calculating gross margin on inconsistent time periods or mixing cash and accrual accounting. Revenue from January sales paired with February material costs produces meaningless margins. Always match revenues and costs from the same accounting period using consistent methods.

Many businesses also ignore the difference between gross margin percentage and gross margin dollars. A product with 20 percent margin but high volume may generate more total profit than a 60 percent margin product with few sales. Focus on margin percentage for pricing decisions and total gross profit dollars for business strategy.

The Math
Worked examples and deeper derivation

Gross margin equals gross profit divided by revenue, expressed as a percentage: (Revenue - Cost of Goods Sold) ÷ Revenue × 100. This formula reveals what percentage of each sales dollar remains after covering direct production costs.

The math stays consistent whether calculating for a single product, product line, or entire business. For multiple products, sum all revenues and all direct costs, then apply the formula. Avoid averaging individual product margins, which can mislead when sales volumes differ significantly.

Cost of goods sold includes only variable costs that change with production volume: raw materials, direct labor, and manufacturing overhead. Fixed costs like rent, insurance, and management salaries never appear in gross margin calculations, regardless of accounting method used.

Coffee shop pricing decision
Monthly revenue $45,000, coffee and food costs $27,000
A 40 percent gross margin leaves $18,000 monthly to cover rent, staff, and other expenses. Industry average is 60-70 percent, suggesting room to optimize supplier costs or raise prices.
Manufacturing startup analysis
Product sales $250,000, manufacturing costs $175,000
At 30 percent margin, this startup has $75,000 to fund operations, marketing, and growth. Manufacturing typically needs 40+ percent margins to scale sustainably.
Freelance consultant review
Client billings $120,000, direct project costs $15,000
An 87.5 percent margin reflects the low direct costs of knowledge work. The $105,000 gross profit must cover all business expenses and personal salary.
Expert Unlock
The thing most explanations skip

Professional buyers and investors scrutinize gross margin trends over time more than absolute percentages. Declining gross margins often signal pricing pressure, rising input costs, or operational inefficiency — red flags that precede profit problems. Conversely, improving gross margins may indicate successful cost optimization, pricing power, or product mix evolution toward higher-value offerings.

What counts as cost of goods sold?

What is a good gross margin percentage?
Good gross margins vary by industry but generally range from 30-80 percent. Retail typically sees 20-50 percent, manufacturing 25-35 percent, and services 50-90 percent. Higher margins provide more cushion for operating expenses and unexpected costs.
Should I include shipping costs in COGS?
Include shipping costs only if they are directly tied to producing or delivering your specific product to customers. Exclude general warehouse or administrative shipping expenses, which are operating costs.
How does gross margin differ from net profit margin?
Gross margin only subtracts direct production costs from revenue, while net profit margin includes all business expenses like rent, salaries, marketing, and taxes. Gross margin is always higher than net profit margin for the same business.

Need something this doesn't cover?

Suggest a tool — we'll build it →