Skip to content

Gross Margin Calculator

Calculate gross profit and gross margin from revenue and COGS — or solve in reverse for the maximum COGS or the revenue you need to hit a target margin.

Written and reviewed by the CalcBundle editorial team. Transparent formulas · results are estimates, not advice.

Inputs
$
$

Gross margin

Enter a revenue greater than zero.

What is a gross margin calculator?

Gross margin is the share of revenue that remains after the direct cost of what you sell. It is a core health metric for e-commerce and SaaS businesses because it sets the ceiling on what you can spend on marketing, overhead and profit.

The formula

  • Gross profit = Revenue − COGS
  • Gross margin % = Gross profit ÷ Revenue × 100

Three ways to solve

  • Gross margin: enter revenue and COGS.
  • Maximum COGS: enter revenue and a target margin to see the most you can spend on goods.
  • Required revenue: enter COGS and a target margin to see the revenue you need.

Gross margin vs net margin

Gross margin stops at COGS; net margin accounts for all other costs. A business can have a strong gross margin but a thin net margin if overhead and marketing are high. For per-unit decisions, also look at contribution margin.

Why gross margin matters for e-commerce and SaaS

High gross margins give you room to acquire customers profitably and to weather discounts and returns. Low gross margins leave little slack, so pricing, sourcing and fees matter enormously. Use the product pricing calculator to price for a target gross margin.

Example

Revenue of $10,000 with $6,000 COGS gives a $4,000 gross profit and a 40% gross margin. To keep a 40% margin at $10,000 revenue, COGS must stay at or below $6,000.

Frequently asked questions

What is gross margin?

Gross margin is the percentage of revenue left after the cost of goods sold (COGS). Gross profit = revenue − COGS, and gross margin = gross profit ÷ revenue × 100.

What is the gross margin formula?

Gross margin % = (Revenue − COGS) ÷ Revenue × 100. For $10,000 revenue and $6,000 COGS, gross profit is $4,000 and gross margin is 40%.

What is the difference between gross margin and net margin?

Gross margin only subtracts the direct cost of goods. Net margin subtracts everything — operating expenses, marketing, taxes and overhead — so net margin is always lower than gross margin.

Can I calculate COGS or revenue from a target margin?

Yes. This calculator works in reverse: enter revenue and a target margin to find the maximum COGS, or enter COGS and a target margin to find the required revenue.

Disclaimer. This calculator provides estimates for informational purposes only. Results are based on the information you enter and the assumptions used by the calculator. Actual financial, tax, business valuation, lending, marketplace or investment outcomes may differ. Consider consulting a qualified professional for decisions involving significant amounts of money. Results are estimates based on the revenue and costs entered.