Business

How to Calculate Profit Margin, and Which One to Use

K By Kev 5 November 2026 Updated 7 November 2026 12 min read
Share
Business guide

Profit margin is profit expressed as a percentage of revenue, and almost every argument about it comes from two businesses using the word for two different numbers. There are three margins worth knowing, they answer different questions, and the one most traders quote is actually markup. This sets out how each is calculated, which decision each one belongs to, and the confusion that costs the most money.

Key takeaways
  • Gross margin answers pricing, operating margin answers whether the shop works, net margin answers the year.
  • Markup is profit over cost; margin is profit over revenue. Buy at 100, sell at 150: 50% markup, 33% margin.
  • The till total is not revenue: it includes deposits and excludes credit sales.
  • A blended margin hides the lines selling at almost nothing; work it per product.
  • Shrinkage left out of cost of goods flatters the margin by exactly what you lost.
On this page▾
  1. Three margins, three questions
  2. Working it out
  3. Where the number goes wrong
  4. A worked example: the 40% that was 28%
  5. How Veira handles it
  6. Frequently asked questions

Three margins, three questions

Gross margin is (revenue minus cost of goods) divided by revenue. It answers: is there enough room in what I sell to cover running the business? It is a buying-and-pricing number, and it is the one to watch per product.

Operating margin takes the costs of running the business out as well -- rent, wages, power, transport -- and divides what is left by revenue. It answers: does the business work? A shop can have a healthy gross margin and a negative operating margin, and that combination is the most common way a busy business loses money.

Net margin takes everything out, including tax and interest. It answers: what did the year actually produce? It is the number for a bank or a buyer, and the least useful one for deciding what to do on Monday.

Want to see it running in your own business first?

Sign Up

Working it out

The same shop, the same month, three numbers.

  1. 1

    Start with revenue, not what came through M-Pesa

    Revenue is what you sold, which is not the same as what was received: part of it may be unpaid, and some of what arrived may be a deposit on something not yet sold. Taking the till total as revenue is where most calculations go wrong before any arithmetic happens.

  2. 2

    Gross margin: subtract what the goods cost you

    Revenue KES 500,000, cost of goods KES 350,000. Gross profit is KES 150,000, so gross margin is 150,000 / 500,000 = 30%. Work it per product category as well as overall; a 30% blended figure can hide a line selling at 8%.

  3. 3

    Operating margin: subtract the cost of being open

    Take out rent, wages, power, transport, airtime, licences. If those come to KES 110,000, operating profit is KES 40,000 and operating margin is 8%. This is the number that tells you whether the shop is working.

  4. 4

    Net margin: subtract everything else

    Interest on a loan, tax, anything left. If those are KES 15,000, net profit is KES 25,000 and net margin is 5%. Same shop, same month: 30%, 8%, 5%, all of them correct answers to different questions.

  5. 5

    Check it against the margin you think you have

    Run the figures through the profit margin calculator and compare the result with the percentage you would have quoted from memory. The gap between the two is the useful finding.

Where the number goes wrong

Quoting markup and calling it margin

Buying at 100 and selling at 150 is a 50% markup and a 33% margin. The second is the real share of revenue you keep, and the difference widens as the number grows: markup against margin.

Using the till total as revenue

It includes deposits on undelivered goods and excludes credit sales. Neither belongs where you put it, and both distort the month.

Leaving the owner's own wage out

A business that is only profitable because nobody is paying the person running it has an operating margin that describes a job, not a business.

Working on a blended figure only

One overall margin hides the lines selling at almost nothing. The per-product view is where the decisions are: what to reprice, what to drop, what to push.

Ignoring shrinkage

Stock that expired, broke or walked out is cost of goods with no revenue against it. Leaving it out flatters the gross margin by exactly the amount you lost.

A worked example: the 40% that was 28%

Worked example

A clothing shop in Nairobi priced on a rule of thumb: buy at 1,000, sell at 1,400, 'forty per cent'. It had been the house rule for years and nobody had rechecked it.

Buying at 1,000 and selling at 1,400 is a 40% markup. As a margin it is 400 / 1,400, which is 28.6%. The shop had been planning its rent and wages against a number nearly twelve points higher than the one it was actually earning.

Nothing in the business had changed. What changed was which arithmetic the owner was doing, and once the real figure was in front of her, two product lines turned out to be selling at a gross margin that could not carry the shop's share of the rent.

Business impact

Running a shop on memory and paper leaves money on the table: missed sales, stock you cannot account for, and receipts KRA will not accept.

Veira records every sale, tracks stock and keeps you eTIMS-compliant automatically, so the numbers look after themselves.

How Veira handles it

Veira knows what each item cost and what it sold for, so margin is reported per product, per category and per branch without anyone assembling it from receipts at month end.

Because stock deducts on the sale, shrinkage shows up as a variance rather than quietly inflating the margin: the gap between what should be on the shelf and what is there is visible while it is still explainable.

And the reporting separates the three numbers rather than offering one 'profit' figure, so the pricing decision and the question of whether the shop is working are answered by the numbers that belong to them.

Frequently asked questions

What is the formula for profit margin?
Profit divided by revenue, expressed as a percentage. Which profit decides which margin: revenue minus cost of goods gives gross margin, minus operating costs gives operating margin, minus tax and interest gives net margin.
What is the difference between margin and markup?
Markup is profit as a percentage of what you paid; margin is profit as a percentage of what you sold for. Buy at 100, sell at 150: that is 50% markup and 33% margin. The gap widens as the numbers grow, which is why quoting one as the other misleads most at the top end.
Which margin should I watch day to day?
Gross margin per product, because that is where pricing and buying decisions live. Operating margin monthly, because that is what tells you whether the shop as a whole is working. Net margin matters annually and to outsiders.
What is a good margin for a Kenyan retailer?
It depends entirely on the category: fast-moving groceries run thin and turn over quickly, while slower lines need more room per sale. The useful comparison is your own margin last quarter and your own margin per product line, not an industry average that averages away the thing you sell.
Should the owner's wage come out?
Yes, if you want operating margin to mean anything. A business that only clears a profit because the person running it is unpaid has not shown that it works; it has shown that it can occupy someone full time.
Where does unsold stock fit?
Not in cost of goods until it sells. Stock bought and sitting on the shelf is money tied up, not cost incurred, and counting it as cost in the month you bought it makes a good month look bad and the next one look better than it was.

Three margins, three questions, and one confusion that costs more than the rest: markup is not margin. Work out your real gross margin per product line before changing any prices, because the figure in your head and the figure in the arithmetic are usually not the same.

Need help, or want to talk it through first? Chat with us on WhatsApp

Keep reading

See all Business guides

Veira for your business

On the Veira side of this: what business management software covers beyond the till.

Browse Veira by business type · Who we serve