Skip to content

Business

Gross Margin Calculator

Enter revenue and cost of goods sold to get gross profit, gross margin, and markup. Gross margin shows how much of each sales dollar is left after direct costs, while markup shows the same profit against cost. The two numbers answer different questions and are not interchangeable. This is an educational estimate, not accounting advice.

Updated 2026-11-12 Editorial estimate Calccc Editorial Team Free · No sign-up

Loading calculator…

What this calculator does

Gross margin is the share of revenue left after paying for the goods or services sold. It is the first profitability number a business can check, because it ignores overhead such as rent, salaries, and marketing. The same gross profit also produces a markup, measured against cost rather than price. Confusing the two is a common pricing error that makes a product look more profitable than it is. This calculator reports both from the same inputs.

How to use it

  1. Enter total revenue for the period.
  2. Enter cost of goods sold, the direct cost of what you sold.
  3. Read gross profit, the dollars left after direct costs.
  4. Read gross margin, the share of revenue kept as gross profit.
  5. Read markup to see the same profit measured against cost.

How it works

Gross profit = revenue - cost of goods sold. Gross margin = (gross profit / revenue) x 100. Markup = (gross profit / cost of goods sold) x 100. Margin divides by price and markup divides by cost, so the two are never equal except at zero profit. A 40% margin is a 66.7% markup, and a 50% margin is a 100% markup. Enter both amounts in the same currency.

Example calculations

Example 1: $100,000 revenue, $60,000 COGS

Gross profit is $40,000, so the margin is 40% and the markup is 66.7%. Pricing by adding 40% to cost would produce only a 28.6% margin.

Example 2: $250,000 revenue, $150,000 COGS

The dollar figures are larger, but the ratio is the same: $100,000 of gross profit means a 40% margin and a 66.7% markup.

Example 3: $50,000 revenue, $20,000 COGS

Gross profit is $30,000. The margin is 60% and the markup is 150%, a reminder that the two measures use different bases.

What the result means

Gross margin shows how much room a product leaves to cover overhead and produce a profit. A 20% margin means 80 cents of every sales dollar goes to direct costs, so fixed costs must stay small. Markup is the pricing tool, starting from cost and adding a percentage. Margin is the performance measure, starting from what the customer paid. Because of that, a target margin must be converted to a markup before you set a price. Margins vary widely by industry, so compare within a sector rather than against an arbitrary number, and watch for direct costs that were left out of the cost of goods sold.

Common mistakes

  • Adding a desired margin percentage to cost, which gives a lower margin than intended.
  • Reporting markup as margin in a pitch or plan.
  • Leaving freight, packaging, or payment fees out of cost of goods sold.
  • Comparing margins across industries with different cost structures.

Assumptions and limits

  • Revenue and cost of goods sold cover the same period.
  • Cost of goods sold includes only direct costs of items sold.
  • Both amounts use the same currency and exclude sales tax.
  • No inventory change distorts the cost figure.

Frequently asked questions

What is the difference between margin and markup?

Margin is gross profit divided by revenue. Markup is gross profit divided by cost. The same profit gives a smaller margin than markup, because revenue is larger than cost whenever there is a profit.

How do I convert a target margin into a markup?

Markup = margin / (1 - margin). A 40% margin becomes 0.40 / 0.60, or 66.7%. Multiply cost by 1 plus that markup to set the price.

Is a 50% gross margin good?

It depends on the industry. Software and services often run well above 50%, while grocery and hardware retail run well below it. Compare with close competitors, not a general benchmark.

Does gross margin include salaries?

Only wages directly tied to producing what was sold, such as hourly production labor. Sales, administration, and management salaries are operating expenses and sit below the gross margin line.

Can gross margin be negative?

Yes. If cost of goods sold exceeds revenue, gross profit and gross margin are negative. That usually means the product sells below its direct cost, before any overhead.

Why is my markup higher than my margin?

Because markup divides by a smaller base. Cost is lower than revenue, so the same gross profit is a larger percentage of cost. A 100% markup is a 50% margin.

Sources

This calculator is an educational estimate and is not accounting, tax, or financial advice. It uses the revenue and cost figures you enter and does not verify how they were classified. Gross margin is not a complete measure of profitability, and results vary with your accounting policies.

2026 update

How to use the professional output

This page is not just a formula box. The result is designed to be checked, compared, and taken away.

  • Professional worksheet. The result includes the inputs used, the method and scope, and a one-variable sensitivity check for finance calculators.
  • A/B scenarios. Save two input sets in the browser and compare the primary, secondary, and breakdown figures side by side.
  • Print / PDF and CSV. Print a branded worksheet, or export the year-by-year table when the calculator produces one.

The formulas and assumptions above still govern the number. The worksheet makes the estimate auditable; it does not make it a lender quote, tax return, or personalized advice.

Go deeper

Guides that explain the math

Gross Margin: Product Economics and Pricing
Business

Gross Margin: Product Economics and Pricing

Gross margin is gross profit divided by revenue. Learn what belongs in cost of goods sold, how margin differs from markup, and how discounts change the economics.

8 min read

Calccc Editorial Team · Updated 2026-11-12

Prepared by Calccc Editorial Team as an educational estimate. This page is not a licensed professional review and is not financial, medical, legal, or tax advice.

Editorial estimate prepared by the Calccc Editorial Team; not a licensed professional review.