Skip to content

Gross Profit Margin Formula

Last reviewed:

Gross profit margin measures the share of net sales left after the cost of the goods sold. It helps answer a specific question: of each sales dollar, how much remains to cover the rest of the business? The arithmetic is short, but choosing consistent revenue and cost figures is what makes the result useful.

The formula and what it means

Gross profit = net revenue − cost of goods soldGross profit margin % = (net revenue − COGS) ÷ net revenue × 100

The denominator is revenue, not cost. A 40% margin means $0.40 of each revenue dollar remains after COGS. It does not mean the company keeps $0.40 as net profit: operating expenses, financing costs and taxes have not necessarily been deducted. If revenue is zero, the margin percentage is undefined, even when a dollar loss can still be calculated.

Choose net revenue for the same sales

Net revenue generally means the sales remaining after discounts, returns and allowances. A $120 list price is not $120 of revenue if the customer receives a $20 discount. Likewise, a returned order should not stay in sales while the associated inventory adjustment is ignored. Use the same period and the same set of completed sales for both revenue and COGS.

For a unit-level pricing exercise, revenue is the selling price of one item under the assumptions you choose. For a monthly business review, use the period’s net sales from your records. Avoid mixing a single product’s cost with company-wide revenue. Decide consistently how sales taxes, shipping charged to customers and other pass-through amounts are treated in your records.

Define COGS rather than using every cash outflow

Cost of goods sold is the cost associated with the goods actually sold, not automatically all inventory purchased during the period. Unsold stock can remain inventory rather than becoming that period’s COGS. Direct materials, acquisition costs and inbound freight can be part of product cost; manufacturing and fulfillment classifications depend on your business and accounting policy.

Rent, advertising and general administration often belong elsewhere in the income statement. Do not move them in and out of COGS merely to make margins comparable with a competitor. When the classification is uncertain, ask an accountant and keep a written definition. This guide explains the relationship between inputs; it cannot determine the right reporting policy for you.

Step by step: $100 revenue and $60 COGS

  1. Confirm the basis. The $100 is net revenue for the sales whose costs total $60.
  2. Subtract direct costs. $100 − $60 = $40 gross profit.
  3. Divide by revenue. $40 ÷ $100 = 0.40.
  4. Convert to a percentage. 0.40 × 100 = 40% gross margin.

At this cost structure, $40 remains for other expenses. If those expenses are $35, the amount remaining after them is very different from the original $40 gross profit. If revenue falls to $80 while COGS stays $60, gross profit becomes $20 and margin falls to 25%. A 20% revenue reduction therefore halves gross profit in this example.

Markup and margin describe different denominators

Using the same $40 profit, markup is $40 ÷ $60 × 100 = about 66.67%. Margin is $40 ÷ $100 × 100 = 40%. Neither is a different dollar profit; they simply compare that profit with different bases. A supplier or colleague saying “add 40%” may mean markup, so confirm the intended denominator before agreeing a price.

Markup % = (selling price − cost) ÷ cost × 100

A 40% markup on $60 produces an $84 price, $24 gross profit and a margin of about 28.57%, not 40%. The markup calculator and conversion table are useful when the pricing instruction starts with a percentage added to cost. Markup needs nonzero cost to be defined; margin needs nonzero revenue.

Work backward from a target gross margin

If unit cost is C and the target margin as a decimal is m, the relationship is m = (price − C) ÷ price. Rearranging gives a pricing equation:

Required selling price = unit cost ÷ (1 − target margin % ÷ 100)

For $60 cost and a 40% target margin, divide $60 by 0.60 to get $100. For $10 cost and a 25% target, divide by 0.75 to get $13.3333…. A displayed $13.33 is a rounded illustration; at that actual charged price the achieved margin is slightly below 25%. Recheck the chosen cent price before treating it as an exact target.

With positive cost, a target of 100% has no finite price because the denominator becomes zero. Targets close to 100% can produce very large prices. The equation does not show whether customers will pay that amount or whether competitors offer a substitute.

Common mistakes in a margin review

  • Averaging percentages without weighting. Two products with different sales totals do not contribute equally. Calculate total gross profit divided by total revenue instead.
  • Ignoring discounts and returns. List-price margins overstate results when realized revenue is lower.
  • Mixing periods. This month’s purchases and this month’s sales may describe different inventory.
  • Calling gross profit cash flow. Inventory timing, credit terms and unpaid customer invoices affect cash independently.
  • Treating payment proceeds as sales revenue without checking the basis. Processor deductions can belong to separate expense categories. Avoid counting a fee twice.

When gross margin helps—and when it is not enough

Gross margin can reveal changes in purchasing cost, product mix, discounting or realized prices. Compare similar periods with the same definitions and examine the dollar gross profit alongside the percentage. A higher margin on very few sales may contribute less money than a lower margin on a larger, viable sales base.

Margin alone does not assess customer acquisition costs, cash availability, return risk, stock turnover or net profitability. A product can have a healthy gross margin and still lose money after advertising and fulfillment. Pair the calculation with operating expenses and real transaction records rather than relying on a universal “good margin” target.

Calculate your figures and review the assumptions

Use the Gross Profit Margin Calculator to check revenue and COGS or solve a target-margin price. Compare supplier pack costs with the price per unit calculator, and inspect processing deductions separately with the PayPal fee estimator. Our methodology explains rounding, validation and limits. If an example or formula appears wrong, send a correction with the inputs and expected result.