KPIs · Chapter 5 · Concept lesson · 7 min read

Margin is a weighted average, so the mix moves it

Margin is what is left after costs, and the store's margin % is an average of its categories weighted by sales. Change what is sold and the margin moves even if no price or cost did.

The idea

Revenue says how much the store sold. Margin says how much of it the store kept. They do not move together, and the reason is mix: a store sells many things at different margins, and its overall margin % is just an average of those margins, weighted by how much of each thing was sold.

Take Harbor & Pine's six categories. Outdoor sells the most, but at about 49% gross margin. Lighting, Kitchen and Textiles sit between 55% and 56%. A dollar of Outdoor sales leaves less than a dollar of Lighting sales, so a store that sells more Outdoor in a month has a lower margin that month, even if every single price and cost stayed put.

Figure 1

2025 on lines with a known cost: from net sales to contribution

$0 $625,000 $1,250,000 $1,875,000 $2,500,000 Dollars Net sales: $2,129,987Cost of goods: $984,984Gross margin: $1,145,003Refunds: $129,835Contribution: $1,015,168 Net salesCost of goodsGross marginRefundsContribution

Step 1 of 5 Start with net sales of the lines whose product has a known cost: $2,129,987.01 in 2025.

  1. Start with net sales of the lines whose product has a known cost: $2,129,987.01 in 2025.
  2. Take off the cost of goods, quantity * unit_cost for the same lines: $984,984.28.
  3. What is left is gross margin: $1,145,002.73, or 53.76% of net sales.
  4. Refunds on those lines cost another $129,834.94. They are money paid back for goods the store already paid for.
  5. Contribution margin is $1,015,167.79, or 47.66% of net sales. It is the figure that actually pays for everything else.

Why it exists

A business can grow revenue every quarter and still stand still on profit. A category with high sales and a thin margin can grow the top line without adding much behind it, and a wave of returns can make a good month an average one. Margin metrics exist to see through revenue to what is left.

There are three rungs, and each answers a different question:

  • Gross margin = net sales − cost of goods sold. Is the product priced above what it costs?
  • Contribution margin = gross margin − refunds. What is left after returned goods are paid back?
  • Margin % = the margin divided by net sales over the same lines.

In this track costs come from products.unit_cost, which is missing on 9 products. Their lines are left out of every margin, numerator and denominator, and a good report says so. If you left their sales in the denominator and their costs out of the numerator, the margin would look better than it is.

How it works under the hood

Margin per line, then add up

Cost of goods for a line is quantity * unit_cost. Margin for a line is its net value minus that cost. Add up lines, then divide by the net sales of the same lines. Never average the margin % of each line: a small, cheap line and a big, expensive one should not count the same. Sum the dollars first and divide once, exactly as with every ratio in this track.

The store margin is a weighted average

Group the lines by category and each category gets a margin % and a share of net sales. Then:

store margin = Σ (category share × category margin)

Two things can move the store margin: the category margins (the rate effect) and the category shares (the mix effect). They are different stories. One says pricing or purchasing changed. The other says customers bought different things.

Figure 2

Store margin rose from Q2 to Q4 2025 while four categories fell

categories
categoryshare_q2margin_q2share_q4margin_q4
Decor9.8%54.13%18.2%52.12%
Furniture17.8%55.32%19.1%53.15%
Kitchen12.3%56.40%15.9%55.34%
Lighting12.8%55.19%22.2%55.67%
Outdoor39.5%49.64%9.4%50.42%
Textiles7.9%56.00%15.1%55.82%
Store gross margin
viewmargin
Q2 actual53.13%
Q4 actual54.01%
Q4 margins, Q2 mix52.77%

Step 1 of 4 Share of net sales and gross margin % for each category in two quarters of 2025.

  1. Share of net sales and gross margin % for each category in two quarters of 2025.
  2. Four categories got thinner margins: Decor, Furniture, Kitchen and Textiles. Only Lighting and Outdoor improved.
  3. Outdoor is the thinnest-margin category, and it fell from 39.5% of net sales to 9.4% after the summer. Richer categories took its place.
  4. Store margin went from 53.13% to 54.01%. Hold Q2's mix fixed and Q4's category margins give 52.77%, lower than Q2. The whole rise is mix.

Splitting rate from mix

The test is the same as in the funnel chapter: recompute the new period using the old shares. If the result stays near the old number, the change was mix. Here the Q4 category margins at Q2's mix give 52.77%, a fall of 0.36 points, so the real change was a worsening of rates (Q4 had deeper holiday discounts, 3.11% of gross sales against 1.64% in Q2) and the mix shift hid it with +1.24 points.

Coverage is part of the number

Before you quote a margin, count how much of the sales it covers. Lines with no known cost cannot be part of the margin, so the figure describes only the rest of the catalogue. If those lines are in a different category, or sell at a different discount, the real margin could differ. State the covered share next to the margin, and leave the uncovered lines out of both the top and the bottom of the ratio.

Revenue mix versus margin mix

A category's share of sales and its share of margin differ whenever its margin % differs from the store average. In 2025 Outdoor made 23.1% of net sales but, at 49.4% margin, a smaller share of margin. Lighting made 18.5% of net sales at 56.0%, and its share of margin is bigger. Ranking categories by revenue alone tells you who is big, not who is paying the bills.

Concentration

A Pareto check asks how concentrated the business is. Rank products by sales, take the running total, and see how many products it takes to reach 80% of sales. The headline "20% of products make 80% of sales" is a hypothesis to test on your own data, not a law. Compute the cumulative share, then read the real figure off it.

What returns cost

A refund returns the sale amount, but the store already paid for the goods. The return rate is a ratio, so write its denominator: refund dollars over net sales, or returned lines over all lines sold. Both are valid, and they are not the same number.

Common misconceptions

"If the margin % went up, the business got more profitable"

Not necessarily. The ratio can rise because the mix moved toward high-margin items while every category slipped. Look at the dollar margin and at the per-category rates before you congratulate anyone, and recompute at last period's mix.

"Gross margin includes every line"

Only lines with a known cost can have a margin. Nine products have no unit_cost, so those lines are excluded. State the coverage next to the margin: what share of net sales it covers. A margin that covers nearly all of the sales is a solid estimate. One that covers half of them is a guess, and the report should say that too.

"Returns are just a revenue problem"

A return takes back revenue, but the store has already paid for the goods, and a refund does not bring that cost back. That is why contribution margin takes refunds off after gross margin. In 2025 the refunds on costed lines were $129,834.94, which lowered the margin from 53.76% to 47.66% of net sales. Looking only at gross margin hides a loss of six points.

Check yourself

One question. Answering it ticks this lesson off on the map; it never locks a level.

Next quarter every category keeps exactly the same margin %, but Outdoor, the lowest-margin category, doubles its share of net sales. What happens to the store's gross margin %?

Pick what may run on this site. You can change this any time from "Cookie settings" at the bottom of every page.