Margin analysis is the process of measuring your margins and explaining why they changed. For a distributor that means gross margin weighted by revenue and broken down by customer, product, segment and rep. Each change is then split into price, cost and mix. Done this way it answers the question a margin report alone cannot: what moved the number, and who owns the fix.
What is margin analysis?
A margin is the share of revenue left after a set of costs. Margin analysis calculates those shares for a period, compares them with a baseline such as last quarter or the budget, and traces the difference to its causes.
Finance teams usually stop at the company level: gross margin, operating margin, net margin. That shows whether the business is healthy, but gives a pricing manager nothing to act on. For a distributor the useful version goes down to the invoice line, because that is where prices are set and where margin is won or lost.
Margin analysis vs marginal analysis
The two terms are close enough to be confused, and search engines often mix them.
The margins worth analyzing
Distributors need three margins. Each answers a different question.
- Gross margin
Revenue minus cost of goods sold. The pricing view of every line.
- Contribution margin
Gross margin minus variable costs such as freight, commission and rebates.
- Pocket margin
What a customer earns you after every on-invoice and off-invoice cut.
Operating and net margin matter to the business, but overhead such as rent and salaries is not caused by a single customer or SKU. Allocating it to lines starts arguments about the allocation key and changes no pricing decision. The gross margin formula and the contribution margin formula guides cover the calculations in detail, and the price waterfall shows how pocket margin is built.
Weighted margin: the mistake in most margin reports
The most common error in a margin analysis is averaging percentages. A report that averages the margin of each line, customer or SKU gives a small order the same weight as a large one.
Take three customers in one quarter:
The simple average of the three margins is 32%. The business earned $7,200 + $2,100 + $1,800 = $11,100 of gross profit on $50,000 of revenue.
A report built on the average would show 32% while the business earned 22.2%. Always divide total gross profit by total revenue for any group of lines, and rank groups by gross profit dollars, not by percentage, so the largest money sits at the top.
How to do a margin analysis, step by step
- Decide the question
Which customers, products or reps missed margin last quarter, and by how much.
- Export invoice lines with cost
Date, customer, segment, SKU, category, rep, quantity, net price, unit cost. Include credits.
- Check the costs before anything else
Lines with zero or missing cost inflate margin and hide real problems.
- Tie the totals to the books
Revenue and cost of goods sold should match the income statement for the period.
- Slice and weight
Gross profit and weighted margin by customer, segment, SKU, category and rep.
- Bridge the change
Split the change against the baseline into price, cost and mix.
- Assign each finding
Every finding gets an owner, an action and a money figure.
Slice by customer, product and rep
The company margin is an average of quite different businesses. In the example below the distributor earned $825,600 of gross profit on $3.2M of revenue in the second quarter, a 25.8% margin. By segment it looks like this:
- Contractors$1.4M revenue, 25.5% margin$357,000
- OEM$600k revenue, 27.0% margin$162,000
- Workshops$500k revenue, 31.4% margin$156,800
- Fleet$700k revenue, 21.4% margin$149,800
Contractors are the largest profit pool and sit just under the company margin, so a single point there is worth $14,000 a quarter. Fleet has the lowest margin on the second-largest revenue. Workshops earn the best margin but the smallest revenue. Each segment needs a different conversation, and the company figure hides all three.
Repeat the same cut by SKU and category to find products priced below their peers, and by rep to find who discounts most. When one cut looks wrong, drill into the lines behind it before drawing a conclusion.
Why margin moved: price, cost and mix
A margin change has three main causes. A margin bridge separates them.
- Price: the same items sold at different prices than in the baseline.
- Cost: the same items bought or landed at different costs.
- Mix: the share of sales moved toward lower-margin or higher-margin customers and products.
In the example, gross margin fell from 27.0% in the first quarter to 25.8% in the second. Repricing every second-quarter line at first-quarter prices and costs, then at first-quarter mix, splits the 1.2 points:
27.0 − 0.9 + 0.3 − 0.6 = 25.8. The bridge puts most of the drop on price: the same items sold for less. That points to the lines, customers and reps behind it, not to purchasing or the market.
Always compute the bridge in a fixed order and report the order with it. Price, then cost, then mix gives slightly different numbers than mix first, and nobody can reproduce a bridge whose order is unknown.
A margin analysis template
A spreadsheet that supports everything above needs one row per invoice line and these columns:
- Date, invoice number, customer, customer segment or price level
- SKU, category, brand, rep
- Quantity, net unit price, unit cost, list price
- Revenue (quantity × net price), cost (quantity × unit cost), gross profit
Add pivot tables for gross profit and weighted margin by segment, SKU and rep, and a second sheet with the baseline period so you can bridge the two. Keep cost and price as values captured at the sale date, never as lookups to today's cost.
Where a monthly margin analysis breaks
A monthly analysis has three limits for pricing.
It arrives after the quotes that caused the change, so the fix starts weeks late. It averages within each slice, so a segment that looks fine can hide one SKU sold across a wide range of prices. And it shows where margin is low, not which specific prices should change. The next step is a line-level search for margin leakage: sales below floor, below cost, below peers, and segments drifting with no price change.
Elastly keeps this analysis current from the invoice lines it syncs from your ERP and ranks every finding by money, with the lines behind it. The question after the bridge, which prices to change, gets its answer on the same screen. Connect your ERP and see your own margin leaks for free.
Run margin analysis on your own data
Common questions
Start with gross margin: revenue minus cost of goods sold, divided by revenue. Calculate it for the whole business, then for each customer, product and rep, always weighted by revenue. Compare it with the previous period and split the change into price, cost and mix, so you know what moved it.
No. A 20% gross margin means 20 cents of every sales dollar is left after the cost of the goods. Warehouse, freight, sales and admin costs still come out of those 20 cents. Net profit is what remains after all of them, and for a distributor it is usually a small fraction of the gross margin.
Margin analysis looks at the margins you earned: gross, contribution and net, by customer, product and period. Marginal analysis is an economics method that asks whether one more unit, order or hour is worth its extra cost. The names are similar, but the questions differ.