Vending: Days Until a Machine Runs Empty

Excel Formulas › Vending

All versions

A sold-out machine earns nothing until you drive back. Divide the units in the machine by its daily sales and round down — that is how many full days you have to get there.


Quick formula: Units on hand over daily sales, rounded down:
=ROUNDDOWN(B2/C2,0)

84 units selling 12 a day gives 7 full days of stock — the gym machine at 90/24 gives just 3.

Functions used (tap for the full reference guide):

The example

Three machines, each with current stock and average daily sales.

ABCD
1MachineUnits on handUnits / dayDays left
2Lobby snacks84127
3Gym drinks90243
4Office combo6597

The formula

Round down — a partial day of stock is not a safe day:

=ROUNDDOWN(B2/C2,0) // stock / daily sales, floored

How it works

The division is a countdown clock:

  1. B2 is the units currently in the machine, from your last service visit.
  2. C2 is average units sold per day — total sales since last visit divided by days elapsed.
  3. ROUNDDOWN keeps only full days; 3.7 days of stock means you plan for 3.

Sort the route by this column and the machines closest to empty rise to the top of the run sheet.

Try it: interactive demo

Interactive

Enter the units in the machine and its average daily sales.

Variations

Restock-by date

Add the days to today for a calendar date the route can act on.

=TODAY()+ROUNDDOWN(B2/C2,0)

Flag urgent machines

Mark anything with under 3 days of stock.

=IF(ROUNDDOWN(B2/C2,0)<3,"RESTOCK","OK")

Pitfalls & errors

Daily sales are an average — a Monday-heavy office machine can empty in half the predicted days. Pad high-variance locations.

Recompute the daily-sales figure at every service visit; a location's velocity drifts with seasons and headcount.

Practice workbook

📊
Download the free Vending: Days Until a Machine Runs Empty practice workbook
Edit the yellow Units on hand and Units / day cells; the Days left recalculates.

Frequently asked questions

Why round down and not up?
Rounding up promises a day of stock you may not have. Flooring the number builds the safety margin into the schedule.
How do I get units per day?
Units sold between two service visits divided by the days between them. Card-reader machines report it directly.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Vending: Restock Par · Vending: Profit per Day · Inventory Reorder Point

Function references: ROUNDDOWN