Gross Margin Calculator

Calculate gross profit and markup, or solve for the revenue or cost needed at a target gross margin. Amounts are displayed in USD; enter revenue and COGS for the same period. No currency conversion is performed.

$

Total revenue or sales amount

$

Direct costs to produce goods/services

Calculate Gross Margin

Enter your revenue and cost to calculate your gross margin percentage and profit.

Gross Margin
40.00%
Gross Profit
$4,000.00

Revenue minus Cost of Goods Sold

Markup
66.67%

Profit / Cost

Gross Margin
40.00%

Profit / Revenue

Summary

Revenue$10,000.00
Cost (COGS)$6,000.00
Gross Profit$4,000.00

Choose the question you need to answer

  1. Gross Margin: enter revenue and COGS from the same period. Cost can exceed revenue; a negative result means a gross loss.
  2. Required Revenue: enter positive COGS and a target from 0% to below 100%. This solves an equation; it does not forecast demand or achievable selling prices.
  3. Maximum Cost: enter positive revenue and a target from 0% through 100%. The result is the COGS ceiling for meeting at least that margin, with revenue held fixed.

Gross margin and markup use different denominators

Gross profit = Revenue − COGS
Gross margin = Gross profit ÷ Revenue × 100
Markup = Gross profit ÷ COGS × 100

A hypothetical $100 sale with $60 COGS produces $40 gross profit: a 40% gross margin and a 66.67% markup. Adding a 40% markup to $60 instead gives an $84 selling price and a 28.57% gross margin.

Work backward from a target

Required revenue = COGS ÷ (1 − target / 100). At $60 COGS and a 40% target, required revenue is $100. Maximum COGS = Revenue × (1 − target / 100). At $100 revenue and the same target, the cost ceiling is $60.

A 100% target with positive COGS has no finite revenue solution. Zero COGS and positive revenue produces a 100% gross margin, but markup remains undefined. The cost mode supports that zero-cost boundary. Results are calculated before display rounding.

Use comparable financial inputs

The SEC’s financial statement guide separates cost of sales, gross profit and later expense deductions. Use net revenue and the corresponding COGS or cost-of-revenue line, then read the issuer’s notes to understand what that line includes.

COGS is not limited to raw materials. The SEC glossary includes relevant production, direct labor and resale costs. This calculator accepts your chosen cost figure; it does not classify expenses or reconcile accounting statements.

Compare periods and businesses only after checking their cost classifications and product mix. No industry benchmark is applied. Gross margin alone does not establish net profitability, cash generation or a stock’s value.

Frequently asked questions

How do I calculate gross margin?

Subtract COGS from revenue, divide the difference by revenue, and multiply by 100. With revenue of $100 and COGS of $60, gross profit is $40 and gross margin is 40%.

How is markup different from gross margin?

Markup divides gross profit by COGS; gross margin divides it by revenue. A $40 gross profit on $60 COGS is a 66.67% markup and, at $100 revenue, a 40% gross margin. Markup is undefined when COGS is zero.

Can gross margin be negative or 100%?

Yes. COGS above positive revenue gives a negative gross margin. Zero COGS with positive revenue gives a 100% gross margin. Zero revenue leaves the margin undefined, so this calculator requires positive revenue.

What do the revenue and cost modes calculate?

Required Revenue divides positive COGS by one minus the target margin. Its target must be at least 0% and below 100%. Maximum Cost multiplies positive revenue by one minus the target margin; it accepts 0% through 100%, including zero COGS at 100%.

Does gross margin measure net profit or cash flow?

No. Gross profit deducts COGS from revenue. Operating expenses, interest and taxes can still reduce net profit. Cash receipts and payments may occur in different periods. This tool does not calculate net margin or cash flow.

What is a good gross margin?

There is no universal threshold here. Compare the same reporting period, business model and cost classification, then read the company’s financial statement notes. A higher gross margin alone does not establish a sound business or an attractive investment.

Compare profit with cash generation

Gross profit does not show when cash arrives or how much is spent on capital assets. Review the separate free cash flow worksheet and its company-data screening limits before comparing the measures.

Open Free Cash Flow Screener