Many businesses track revenue to the last dirham and only learn their margin once a year, at closing. That is the wrong way round: revenue pays the ego, margin pays the salaries.

The problem is not the difficulty of the calculation — it fits on one line. It is the level of detail you apply it to.

The formula, and the trap inside it

Gross margin = Net revenue − Cost of goods sold
Margin rate (%) = Gross margin ÷ Net revenue × 100

The trap is in the phrase "cost of goods". Most managers use the price on the supplier invoice. For imported goods, that price sometimes represents only 70% of the real cost.

Full purchase cost includes:

A margin calculated on the supplier price alone is systematically overstated. On imported low-unit-value products, the gap between reported and real margin frequently exceeds ten points.

Beware the margin / markup confusion

Two different indicators, often mixed in the same conversation:

Margin rate = (Selling price − Cost) ÷ Selling price
Markup rate = (Selling price − Cost) ÷ Cost

A product bought at 100 MAD and sold at 150 MAD has a margin rate of 33% and a multiplier of 1.5. When a salesperson says "we make 50% on this one", they almost always mean the second. The difference is not trivial: it distorts pricing decisions and team targets.

Set an internal convention and stick to it.

Three views, three different decisions

Company-wide margin steers nothing. It is an average, and an average always hides the extremes.

By product: deciding your assortment

Cross sales volume with margin rate for each reference. Four situations emerge:

Low margin High margin
High volume Watch closely Your engines
Low volume Candidates for delisting Push these

The high-volume / low-margin quadrant deserves close attention: these products keep the shop busy but fund very little. Sometimes they are essential loss leaders; sometimes they are simply the result of a purchase price never renegotiated.

The low-volume / high-margin quadrant is the most commonly neglected. These are products your customers would buy if someone offered them.

By customer: deciding your discounts

This is the most uncomfortable and most useful analysis. Take your twenty largest customers, calculate the margin generated on each, and rank them by margin rather than revenue. The ranking almost always changes.

A large customer who negotiated a 12% discount three years ago, on products whose purchase price has risen since, may be close to zero margin. Yet they occupy your team, your logistics and your cash.

Add payment terms to the reading: an 18% margin collected at 120 days is not worth a 15% margin collected on delivery.

By channel: deciding where to invest

Retail, wholesale, field sales, online store: each channel has its own cost structure and margin. A channel growing fast in revenue but diluting overall margin can be losing money on every additional order.

The calculation that should be continuous

Annual tracking allows no correction. Monthly tracking allows you to react. Continuous tracking allows you to avoid the mistake before it is made.

In practice, three moments matter:

When the quote is drawn up. The salesperson should see the line margin as they enter the price, not discover it at closing. That is the only moment the decision can still be changed.

When a purchase price is updated. Every supplier increase should trigger a review of the affected selling prices. Without that, margin erodes silently, product by product.

In the monthly review. Compare this month's margin rate with last month and with the same month last year. A two-point drop on stable revenue signals a structural problem: discounts too generous, purchase price increases not passed on, or a shift in product mix.

The mix effect, often invisible

Your margin can fall without a single price changing. It is enough for the share of low-margin products to grow within total sales.

A simple example. You sell two families, one at 40% margin, the other at 20%.

Four points lost, no price touched. That is the mix effect. You only see it if you track margin by product family — never if you look at the total alone.

The five most common mistakes

  1. Calculating on the supplier price alone, ignoring transport and customs.
  2. Confusing margin and markup in sales targets.
  3. Reasoning on the overall average, which masks loss-making products.
  4. Forgetting year-end rebates granted to customers, which are deducted after the fact.
  5. Not accounting for shrinkage: breakage, expiry and theft all come off real margin.

Where to start

  1. Check that your purchase prices in the system include landed costs. If not, fix your twenty best-selling references first.
  2. Pull margin by product over the last twelve months and place each reference in the volume / margin matrix.
  3. Pull margin by customer for your top twenty accounts and compare the ranking with the revenue ranking.
  4. Set a thirty-minute monthly review with just three figures: overall margin rate, year-on-year change, and the five references whose margin fell most.

Where software fits

This work is possible in a spreadsheet, but it quickly becomes wrong: purchase prices change, discounts accumulate, and manual re-entry introduces its own errors.

Business management software calculates margin at the sales line, from the actual purchase cost recorded at receipt. Margin then becomes visible by product, by customer, by salesperson and by period, with no re-keying.

In G-stock, margin appears as the quote is entered, before validation. Reports cross product, customer and channel over the period you choose, and landed costs are built into the cost price from the moment goods are received.