Gross Margin Calculator

Calculate gross margin, gross profit, markup, and COGS ratio from revenue and costs. See the gross profit margin formula, examples, and benchmarks.

Currency
50K
$
30K
$
Gross Margin
40.00%
$20,000 gross profit
Gross Profit
$20,000
Revenue minus COGS
Markup
66.67%
Profit over cost
COGS Ratio
60.00%
Cost as % of revenue
Your calculation

Revenue $50,000COGS $30,000 = Gross Profit $20,000. Gross Margin = ($20,000 / $50,000) × 100 = 40.00%.

Revenue Breakdown

How your revenue splits between cost and profit

COGS
$30,000
60%
Gross Profit
$20,000
40%

What is Gross Margin?

Understanding the fundamentals of gross margin calculation

Gross margin is a profitability metric that measures the percentage of revenue retained after deducting the cost of goods sold (COGS). It represents how efficiently a company converts revenue into profit before accounting for operating expenses, taxes, and interest.

A higher gross margin indicates that a company keeps more money from each dollar of sales, which can be used to cover operating expenses, invest in growth, or return to shareholders. It is one of the most important metrics for evaluating business health and pricing strategy.

How to Calculate Gross Margin

Step-by-step formulas for gross margin, gross profit, and markup

Gross Profit

Gross Profit = Revenue - Cost of Goods Sold (COGS)

Gross Margin Percentage

Gross Margin (%) = (Gross Profit / Revenue) × 100

Markup Percentage

Markup (%) = (Gross Profit / COGS) × 100

Example Calculation

If your revenue is $100,000 and COGS is $60,000, then: Gross Profit = $100,000 - $60,000 = $40,000. Gross Margin = ($40,000 / $100,000) × 100 = 40%. Markup = ($40,000 / $60,000) × 100 = 66.67%.

Calculate Margin from Cost & Selling Price

How to find gross margin when you know your unit cost and the price you charge

If you know your cost per unit and your selling price, the formula is the same — just substitute selling price for revenue and cost for COGS:

Gross Margin (%) = ((Selling Price − Cost) / Selling Price) × 100

Example: If your cost is $60 and you sell for $100: Gross Profit = $100 − $60 = $40. Gross Margin = ($40 / $100) × 100 = 40%. Markup = ($40 / $60) × 100 = 66.67%.

Use the calculator's Cost & Selling Price mode to enter your numbers directly and see all results instantly — no manual formula needed.

Calculate Selling Price for a Target Margin

How to find the price you need to charge for a desired gross margin percentage

To calculate what selling price you need to achieve a specific gross margin percentage, use the reverse formula:

Required Selling Price = Cost / (1 − Target Margin as decimal)

Example: If your cost is $60 and you want a 40% gross margin: Selling Price = $60 / (1 − 0.40) = $60 / 0.60 = $100. At this price, Gross Profit = $100 − $60 = $40, giving you exactly 40% margin.

This reverse calculation is essential for pricing strategy — it tells you the minimum price to charge. Use the calculator's Target Selling Price mode to find your required price instantly.

Gross Margin vs Markup

How markup accelerates exponentially compared to margin — a 50% margin equals 100% markup

Margin %
Markup %

While both measure profitability, margin and markup use different bases. Gross margin is calculated as a percentage of revenue (selling price), while markup is calculated as a percentage of cost. A 50% markup produces a 33.33% margin, not a 50% margin.

Gross Margin by Industry

Typical gross margin ranges to benchmark your business performance

Range
Typical
Software / SaaS
78%
Pharmaceuticals
68%
Financial Services
60%
Consulting / Services
55%
Consumer Electronics
35%
Retail (General)
35%
Manufacturing
30%
E-commerce
30%
Food & Beverage
25%
Grocery / Supermarket
15%
Automotive
15%
Construction
18%
0%25%50%75%100%

Approximate ranges based on publicly reported industry data (sources: NYU Stern, CSIMarket, S&P Capital IQ). Individual company margins may vary significantly based on business model, scale, geography, and competitive dynamics.

How to Improve Gross Margin

Actionable strategies to increase your gross margin percentage

Optimize pricing

Regularly review and adjust prices based on market conditions, competitor analysis, and perceived value.

Reduce COGS

Negotiate better supplier terms, find alternative materials, or improve production efficiency.

Improve product mix

Focus on selling higher-margin products. Analyze margin by product line to promote the most profitable offerings.

Minimize waste & returns

Reduce material waste, shipping damage, and returns through better quality control and packaging.

Leverage economies of scale

As production volume increases, per-unit costs typically decrease, improving gross margin percentage.

Automate production

Invest in automation to reduce labor costs per unit while maintaining or improving output quality.

Frequently Asked Questions

Common questions about gross margin calculation and analysis

Embed Gross Margin Calculator

Add this calculator to your website or blog for free.