Calculators / Quick tool

Gross Margin Calculator

Calculate gross profit, gross margin and cost ratio from revenue and cost of goods sold.

● Processed locally in your browser
Processed locally in your browser
Gross margin result Choose an action to process the input.
How to useHow to use Gross Margin Calculator

What the tool actually does

Calculate gross profit, gross margin and cost ratio from revenue and cost of goods sold.

Reproducible example

Example input
revenue=125000
cost=76000
Expected result
Gross profit: 49000
Formula: gross profit = revenue − cost of goods sold
Substitution: 125000 − 76000 = 49000
Gross margin: 39.2%
Formula: gross margin = gross profit ÷ revenue × 100
Substitution: 49000 ÷ 125000 × 100 = 39.2%
Cost ratio: 60.8%
  1. 1

    Paste content, enter parameters or choose the files you need in “Revenue and cost of goods sold”.

  2. 2

    Choose “Calculate margin” for the job. Processing runs in this browser.

  3. 3

    Review the result under “Gross margin result”, then copy or download it after checking the output.

Result guide

What Gross Margin Calculator calculates

Enter revenue and cost of goods sold from the same period. The calculator subtracts cost to find gross profit, then divides profit and cost by revenue to report gross margin and cost ratio.

Gross margin formulas

Gross profit = revenue − cost of goods sold. Gross margin % = gross profit ÷ revenue × 100. Cost ratio % = cost of goods sold ÷ revenue × 100. Revenue must be greater than zero.

Worked gross-margin example

With revenue of 125,000 and cost of goods sold of 76,000, gross profit is 49,000. Gross margin is 49,000 ÷ 125,000 = 39.2%, while the cost ratio is 60.8%.

Keep revenue and cost definitions aligned

Use figures from the same period and currency, and use the accounting definition of cost of goods sold that applies to the business. This arithmetic result does not include operating expenses, taxes, returns or cash timing unless those amounts are already reflected in the inputs.

Frequently asked questions

What is the difference between gross margin and markup?

Gross margin divides gross profit by revenue. Markup divides the same profit by cost. They use different denominators and are not interchangeable.

Should shipping and payment fees be included in cost?

That depends on the reporting definition you use. Apply one consistent policy across periods and compare this result with the business accounting records.

Can gross profit be negative?

Yes. If cost of goods sold is greater than revenue, the calculator reports a negative gross profit and gross margin.

Ecommerce & pricing decision chain

Do not read one metric in isolation

Verify unit economics, set acquisition limits, test the offer, then check collection and inventory. Each stage continues into another real calculation.

  1. 01 · Profit baseline Margin, returns and contribution
  2. 02 · Acquisition ceiling ROAS, CPC and customer value
  3. 03 · Offer decision Discount and price-volume tradeoffs
  4. 04 · Cash efficiency Collection and inventory turnover

Shared seller worksheet: Gross margin

Selling 100 units at $100 creates $10,000 revenue. With $3,000 of product COGS, gross profit is $7,000 and gross margin is 70%. Fulfillment, payment fees, ads and returns still belong in the later contribution decisions.