Skip to content
MarginLoop

How each figure is actually worked out.

Every calculation MarginLoop performs, in the order it performs them, with the assumptions named. If something here looks wrong for your business, it probably is. Most of these inputs are yours to set, and the ones that are not are inferences we label as inferences.

Last updated: September 2026

FOUR RULES THAT APPLY TO EVERYTHING

Rules that come before any formula

  • Money is held in pence, and rounded once

    No intermediate value is rounded. 367 × £18.60 is held exactly and rounded at the very end, to £6,826. A total that is the sum of several already-rounded numbers is a total nobody can reconcile against their own ledger.

  • Every figure is net of VAT

    Consistently, across purchases, stock and receivables. Mixing gross and net figures is the fastest way to produce numbers that cannot be reconciled with an accounts package, and it is invisible until somebody tries.

  • Different kinds of money are never added

    A rebate already earned is a receivable. Stock above target is working capital. Payment drift is a timing effect. A tier not yet reached is a purchasing decision. Each is reported separately and never combined into one total.

  • Identified is not realised

    MarginLoop distinguishes identified, actioned, observed and attributed. A later change in the data is not by itself value MarginLoop created: stock can sell down on its own, and an account can return to its average without anyone calling. Only an attributed outcome, where an action was taken and the evidence links the result to it, supports a claim that money moved. Nothing on this site or in the product describes identified value as found, freed, recovered or saved.

THE CALCULATIONS

One section per figure

STUCK

How much stock is beyond what the business actually needs?

Weeks of cover, and stock above target

  1. 1Average weekly sales over the last 12 complete weeks. Complete weeks only, because a part week at either end drags the average in a direction nobody intended.
  2. 2Weeks of cover on hand = stock on hand ÷ average weekly sales. Here, 400 ÷ 11 = 36 weeks.
  3. 3Target cover = your supplier lead time + your safety cover. Here, 2 + 1 = 3 weeks. This is your number, not ours.
  4. 4Target units = average weekly sales × target cover = 33 units.
  5. 5Units above target = stock on hand − target units = 367 units.
  6. 6Value = units above target × landed cost = £6,826.

What it accounts for

  • Landed cost, not invoice price. For an imported line, freight, duty and clearance are part of the money tied up, and using invoice price alone understates it.
  • Stock on order is counted separately, never folded into this figure. Projected cover after inbound is reported as its own number.
  • Case size and minimum order quantity are read before any suggestion to reduce an order, because a reduction that cannot be made is not a recommendation.
  • Shelf life and ageing are read. Twenty weeks of ambient rice and twenty weeks of a short-dated line are not the same exposure.
  • A line marked as a deliberate bulk buy is excluded, with the reason recorded.

When it produces no figure

If the stock file is stale, or sales history is too short to give a stable velocity, MarginLoop lowers confidence or suppresses the recommendation rather than producing a number from a bad input.

OWED

Has a supplier condition been met that has not been credited?

Rebate to check, and rebate opportunity

  1. 1Qualifying purchases are totalled over the agreement period, excluding whatever the agreement excludes. Here, 1,160 cases and £29,600 of qualifying spend.
  2. 2Each tier threshold is compared against that total. Here the 1,000-case tier was crossed on 14 August.
  3. 3Entitlement = qualifying spend × tier rate = £29,600 × 2.5% = £740.
  4. 4Credit notes already received against that tier are subtracted. Here, none, so the difference is £740.
  5. 5A tier not yet reached is reported separately as an opportunity, with the volume still required and what reaching it would be worth. It is never added to what is owed.

What it accounts for

  • Supplier terms are versioned with effective dates. What a business was entitled to last year depends on the agreement that applied last year, not the current one.
  • MarginLoop reports that a condition appears to have been met and shows the evidence. It does not assert that a supplier will agree, and it never contacts the supplier.
  • A finding of this kind is labelled REBATE TO CHECK while it is a question, and REBATE VERIFIED once the credit note appears in your purchase ledger. MarginLoop reads that transition from the data; nobody is asked to confirm it.
  • Rebates are paid on many different mechanics: automatically, quarterly, annually, retrospectively, by credit note, or only on submission. MarginLoop does not assume yours.

When it produces no figure

Where an agreement's terms cannot be read unambiguously, MarginLoop says the terms are unclear and shows what it did read, rather than guessing at a tier structure.

SLIPPING

Is an account paying later than it used to, before anything is overdue?

Payment behaviour

  1. 1Days to pay is measured per invoice, per account: settlement date minus invoice date.
  2. 2Each account is compared against its own rolling twelve-month average, not against its agreed terms and not against a portfolio average. An account that has always paid at 45 days has not deteriorated.
  3. 3Drift is flagged on a sustained change, not a single late invoice. Here, three consecutive invoices on each of 4 accounts, settling 11–14 days beyond that account's own average.
  4. 4The working-capital effect is worked per account, from that account's own invoices: average invoice value × extra days ÷ days between invoices. On Account 1042 that is £420 × 13 ÷ 7 = £780. Summed across the 4 accounts and rounded once: £2,300.

What it accounts for

  • This is a timing effect, not a loss and not a bad debt. Nothing here is overdue, which is precisely why a receivables report does not show it.
  • Every input is a figure from the affected accounts themselves: their own invoice values, their own invoicing intervals, their own twelve-month average. No annual total is divided by 365, so nothing here assumes invoicing is spread evenly across the year.
  • Account identifiers and dates are sufficient. No customer names, addresses, phone numbers or email addresses are needed at any point.
  • Seasonal accounts are read against their own seasonal pattern where there is enough history to establish one.

When it produces no figure

With fewer than a handful of invoices, an account has no stable baseline, and MarginLoop reports insufficient evidence rather than a drift figure.

SLIPPING

Are several codes actually the same product, bought at different prices?

Product matching and duplicate codes

  1. 1Codes are compared on description, pack size, case size, barcode where present, and supplier.
  2. 2Each candidate match carries a confidence score, and the score is shown rather than hidden behind a merge.
  3. 3Financially consequential matches are never merged silently. Ambiguous ones go to a review queue for the customer to confirm.
  4. 4Only once a match is confirmed does MarginLoop attach a figure to the price spread.

What it accounts for

  • The same product can legitimately carry different prices by date, supplier, promotion, pack change or landed cost. A price difference is not by itself evidence of a mistake.
  • A confirmed match is remembered as a rule, so the same question is not asked twice.

When it produces no figure

Below the confidence threshold, MarginLoop asserts no figure at all. The example on the home page sits at 78% and deliberately carries no number.

SEASONAL

When does demand move, and by how much for this business?

The trading calendar

  1. 1Observance dates come from one verified calendar source, shared between the product and this website, so the two can never quote different days.
  2. 2Each observance carries its calendar system, Islamic lunar, Hindu lunisolar or solar, because they move differently and some do not move at all.
  3. 3Your own historical demand is aligned to days-before-the-date rather than to the calendar date, so last year's pattern still applies when this year's date has moved.
  4. 4The uplift, the lead-in and the shape of the peak are read from your history. MarginLoop does not arrive with a view about what sells.

What it accounts for

  • Where a UK observance depends on local moon sighting, the date can move by a day, and that is stated rather than hidden.
  • Wedding season is treated as a broad, regionally variable pattern rather than as a fixed date, and read from your own order history.
  • Product-category assumptions are not hardcoded. What sells at Diwali for one account is not what sells for another.

When it produces no figure

Without at least one prior cycle in your history, MarginLoop has nothing to align and says so, rather than substituting a generic seasonal curve.

HOW CONFIDENCE WORKS

What the labels on every figure mean

These are properties of the data, applied by the calculation, not adjectives added by whoever wrote the sentence. That is the only way a convention like this stays honest.

  • OBSERVED

    Read directly from a source file. A purchase invoice line, a stock count, a settlement date. No inference of any kind.

  • CALCULATED

    Arithmetic on observed values, using rules you set. Every calculated figure opens to its full decomposition and its source rows.

  • ESTIMATED

    Depends on an inference that could be wrong: a product match, a behavioural read, a projection. Always carries a confidence.

  • RECOMMENDED

    A suggested action, not a fact. Phrased as a suggestion, and always the customer's decision.

Confidence runs high, medium, low, and not enough evidence. The last is not a low score. It is the state in which MarginLoop declines to produce a figure. The absence of an answer is sometimes the most trustworthy answer available, and a product that never reaches that state is a product that is guessing.

Every source carries the time it was last refreshed, shown per source rather than as one timestamp for the whole list. If the stock file is four days old, confidence drops and purchasing recommendations are suppressed. Stale data is never used quietly.

WHEN IT IS WRONG

What happens to a correction

Corrections are structured, not free text, because the reason determines what changes. MarginLoop records which of these it was, who said so and when.

  • Incorrect product match
  • Incorrect stock figure
  • Target cover is wrong
  • This was a deliberate bulk buy
  • Supplier terms have changed
  • Normal behaviour for this customer
  • Exceptional promotion
  • Something else
  • The correction is applied to the next list rather than the same item being raised again the following morning.
  • Repeated dismissals of the same alert suppress it, and it resurfaces only on a material change.
  • A change to a business rule, a cover target moving from three weeks to eight say, is recorded with who changed it and when, because a later figure depends on knowing what applied at the time.
  • “It learns” means exactly this: persistent rules and configuration, applied when the next list is evaluated. It is not a model retraining itself on your business overnight, and saying so is both more accurate and easier for you to check.

HOW IT WORKS

The loop the name refers to

It sits above what you already run. No migration, no rip-out, and no new system for your team to learn.

Step 01

Read

A read-only export or connection from the systems you already use. Sales, purchases and stock, exactly as they are today.

Step 02

Find

Owed, stuck, slipping. Arithmetic on your own history, run overnight, against the cover targets and terms you set.

Step 03

Decide

Accept, defer or correct. Every line opens to its working first, so the decision is made on the evidence rather than on the headline.

Step 04

Act

Your team raises the claim, pauses the order or makes the call. MarginLoop does none of these. It does not write to your systems or contact anyone.

Step 05

Verify

Did the credit note arrive? Did stock above cover fall after the buying changed? The outcome is read from the data that follows, and attributed to an action only where the evidence supports it.

Step 06

Learn

Corrections and exceptions are remembered as rules, with who set them and when, and applied to the next morning's list.

Then it starts again with tomorrow's data, which is the whole point of the name.

DELIVERY

Push, not dashboards

A dashboard is one more thing to remember to open. MarginLoop sends the list to WhatsApp or email, whichever you already look at, and takes your answer in the same place.

You choose the days, the recipients, the channel, and how high the bar has to be before something is worth sending. A list that arrives on Christmas Day, or on Eid, is a list that gets muted.

MarginLoop

6:02am

REBATE TO CHECK

CALCULATED

£740

Gill Foods passed its 1,000-case tier on 14 August and no credit note has arrived. Worth checking the agreement.

A worked example using realistic trade data, not a customer result.

Designed to read exports from the systems your business already runs

Read-only. If your system can export the sales, purchase and stock fields MarginLoop needs, we can normally work with it. Compatibility is checked before onboarding.

  • Sage
  • Xero
  • QuickBooks
  • Cybertill
  • EPOS Now
  • Unleashed
  • SumUp
  • Bespoke exports

Third-party product names are the trademarks of their owners, and are listed to describe compatibility. No affiliation or endorsement is implied.

STRAIGHT ANSWERS

The three questions everyone asks

How does my data get in?

We start with a read-only export or connection from the systems you already use. In the first week we will ask a few questions about product matches and cover levels; after that, nobody changes how they order, invoice or count.

How long until I see something?

Your first morning list within a week of us receiving twelve months of history, sooner if your export is clean. Weeks two and three are where your corrections refine it.

Who else sees my numbers?

Your commercial data is isolated from every other customer's, is never pooled or benchmarked, and is never sold or shared with your suppliers. Our hosting provider and named sub-processors technically process it to run the service; they are listed in the Data Processing Agreement you get before any data is shared.

An aisle of a cash and carry lined with bulk groceries and cases stacked to the ceiling.

FAQ

One more, about your systems

Usually, if your system exports the sales, purchase and stock fields needed. MarginLoop reads common accounting, EPOS and stock exports, including older or bespoke ones. We check compatibility on the fit check.

Bring one export, and we will show you this on your own numbers.

Thirty minutes. If the arithmetic does not find anything worth having in your twelve months, we will tell you on the call.

OBSERVED
Read directly from a source file. No inference.
CALCULATED
Arithmetic on observed values, using rules you set. Opens to its working.
ESTIMATED
Depends on an inference that could be wrong: a product match, a behavioural read, a projection.
RECOMMENDED