PLC downtime percentage calculation per shift

8 min read · Published November 8, 2026

Downtime percent per shift is (scheduled production time minus accumulated running time) divided by scheduled production time, times 100. Dividing elapsed time by running time gives the inverse of efficiency and grows as the machine stops more. Define scheduled time after planned breaks, confirm the timer counts seconds before dividing by 28800 s, write the overnight shift with an OR comparison, and hold the live percentage until the denominator is big enough to trust.

Downtime percentage per shift answers one question: of the time the machine was scheduled to produce, how much did it lose? The calculation is (scheduled production time minus accumulated running time) divided by scheduled production time, times 100. The ratio that suggests itself first, elapsed time divided by running time, gives the inverse of efficiency: it climbs as the machine stops more, so it moves the wrong way for a percentage. This page stays on the arithmetic: what counts as scheduled time once breaks come out, why the timer time base decides whether dividing by 28800 s is valid, how to write the overnight shift window that crosses midnight, and when a live percentage should hold its output. For the stop events behind the number, the automatic stop detection and shift totals in PLC downtime tracking with automatic stop detection and shift totals build on the same running-time accumulator.

What each term in the formula means

Downtime percent = (scheduled production time - running time) / scheduled production time × 100. Efficiency percent = running time / scheduled production time × 100. With downtime defined as every scheduled second the machine is not running, the two percentages always sum to 100.

Scheduled production time is clock time from shift start to shift end, minus planned breaks. The PLC clock owns it, because the clock keeps counting through lockouts, panel restarts and dropped communications.

Running time is a retentive timer accumulated while two conditions hold: the shift bit is on and the machine-running input is on. In the rung this page follows, that is B3:0/0 and I:1.0/0 feeding retentive timer T4:0.

Downtime is the difference. At shift end it needs no timer of its own: subtract running time from scheduled time.

On the panel, four numbers carry the story: scheduled seconds, running seconds, downtime seconds, and the percent. Show them in that order so the percent has context.

Scheduled time: take the planned breaks out first

An 8-hour shift spans 28800 s of clock time. Planned breaks come out before anything else. One 15-minute break leaves 27900 s of scheduled production time. The three 15-minute breaks per shift used in the worked example below remove 3 × 900 = 2700 s and leave 26100 s.

Apply the break schedule to both sides of the formula. The running-time timer pauses during a break and the denominator loses the same interval, so a break in progress never moves the displayed percent.

Decide the rule for a machine that runs through a scheduled break, and apply it every shift: either the interval stays out of the calculation, or the extra production counts as running time inside it. A rule applied half the time shows up as percentages that drift between shifts.

A lockout for a production fix is downtime under this definition: the machine was scheduled to run and the running input is false. The PLC clock keeps counting through the lockout, which is why the schedule belongs to the controller. Shift bits should also survive a panel restart or a dropped link; keeping PLC schedules running when the HMI panel is offline covers that failure case.

One reporting variant counts planned breaks inside the denominator as scheduled downtime, which holds availability below 100 percent even on a shift with no unplanned stop. If your reporting works that way, OEE calculation with planned downtime counted in the denominator follows that convention; the arithmetic on this page removes breaks from both terms.

The time base decides what the division means

A retentive timer holds its accumulator when the rung drops out and clears it only on a reset instruction. That is the right behavior for a shift total, with two consequences to check.

First, the accumulator counts time-base ticks, so it reads seconds only when the instruction's time base is 1 s. The rung this page follows sets T4:0 to a 1 s base with a 32767-count preset, and dividing a raw accumulator by 28800 s of shift is valid on that base alone. On a 0.01 s base the same accumulator tops out at about 328 s, and a full shift overflows it well inside the first hour.

Second, 32767 counts at 1 s leaves 3967 s of headroom over the 28800 s shift, about 66 minutes. If a schedule change pushes the shift past that, step a counter from the timer's done bit and roll the pair into the shift total.

Edge and scan effects stay small when the base is right: each on or off edge lands within about half a time base, so a 1 s base adds up to about 0.5 s per edge, and counts go missing once the scan time approaches the time base.

For an integer percent at shift end, divide by scheduled seconds divided by 100 when that divides evenly: 288 for an unbroken 8-hour shift, 261 for the 26100 s three-break schedule. Divide scheduled minus accumulator by that number for downtime percent, and the accumulator by it for efficiency percent. Integer division truncates the decimal; a float file keeps it.

Shift windows and the midnight shift

Derive the shift bits from the clock's hour word, S:40 in this addressing. First shift runs 07:00 to 15:00, so hour >= 7 AND hour < 15 turns on B3:0/0. Second shift is hour >= 15 AND hour < 23. Third shift spans 23:00 to 07:00 and crosses midnight, so it takes an OR: hour >= 23 OR hour < 7. Join the two halves with AND instead and the third-shift bit is never true, because no hour satisfies both at once.

Hour comparisons set whole-hour windows. The three 15-minute breaks in the worked example fall inside those windows, so drive each break tag from the clock's minute word, or from scheduled time events that latch and unlatch it at configured minutes. A break tag built on hours alone cannot start at 09:45.

Worked example: 8-hour shift with three 15-minute breaks

Inputs, with their sources:

  • Shift window 07:00 to 15:00, 8 h, which is 28800 s (the first-shift window above).
  • Three planned breaks of 15 min each: 3 × 900 s = 2700 s (the three-break schedule used throughout this page).
  • Running-time accumulator T4:0.ACC on a 1 s time base reads 23490 s at 15:00 (the handover reading on this machine, an illustrative measured input).

Rule in words: downtime percent is the scheduled seconds the running timer never collected, divided by all scheduled seconds, times 100.

Arithmetic:

  • Scheduled production time = 28800 - 2700 = 26100 s.
  • Downtime = 26100 - 23490 = 2610 s.
  • Downtime percent = 2610 / 26100 × 100 = 10.0 %.
  • Efficiency percent = 23490 / 26100 × 100 = 90.0 %.
  • Sum check: 23490 + 2610 = 26100 s, matching the schedule exactly.

Result: the shift lost 10.0 percent of its scheduled production time, which is 2610 s, or 43.5 min inside a 435 min scheduled window.

Decision: against a 10 percent plant target this shift sits on the line, and the sensitivity is fixed by the schedule. One more 15-minute unplanned stop adds 900 s, worth 900 / 26100 = 3.4 points, so three more stops land at 20.3 percent. The minutes are the thing to manage; the percent reports them. These figures double as the commissioning test: force 23490 s into the accumulator, run the logic, and expect 10.0 percent on the display.

A live percentage that never divides by zero

Fifteen minutes into a shift the denominator is still small, and one stop owns the whole number: at 1800 s of scheduled time elapsed, a single 900 s stop already reads 50 percent. Hold the live display until elapsed scheduled time reaches 1800 s (30 min), and show running minutes or a dash until then.

The live denominator is scheduled time elapsed so far: clock seconds since shift start, minus completed break intervals. The live numerator is that same elapsed schedule minus the running accumulator. Pause both during a break in progress and the percent holds still through the break, then tracks toward the shift-end value.

Formatting a total as hours, minutes and seconds on the panel is a display conversion of its own; adding minutes and seconds to a total time display on a PLC walks through it.

Verify the numbers before you report them

Check these once on the floor, before the percentage feeds a report:

  • Machine stopped with the shift bit on: T4:0.ACC holds still.
  • 60 s of running: the accumulator gains about 60 s, within the half-second edge error of a 1 s base.
  • At 23:00 and again at 00:00: exactly one shift bit is true and it agrees with S:40. The overnight window is the one that fails when the OR is missing.
  • During each break: elapsed scheduled time and the accumulator both pause, and no break interval is subtracted twice.
  • One hand-checked point: downtime plus running equals scheduled, 26100 s in the example. A mismatch points at the time base or a double-counted break.
  • After a controller restart and a clock correction: totals land in the correct shift and no stale shift bit survives.

Watching T4:0.ACC and the shift bits together makes these checks quick; watch several PLC timer values in one data view sets that up.

The decision

Recommendation: Calculate downtime percent as (scheduled production time minus running time) divided by scheduled production time; subtract planned breaks from both terms; accumulate running time on a 1 s time base; reset the retentive timer once per shift through a one-shot; write the overnight window as hour >= 23 OR hour < 7; and hold any live percentage until 1800 s of scheduled time has elapsed. Keep the PLC clock as the schedule owner.

By case: for the end-of-shift report, divide scheduled minus accumulator by scheduled seconds divided by 100 when that divides evenly, 288 for an unbroken 8-hour shift and 261 for the three-break schedule. For the live display, run the same formula against elapsed scheduled time behind the inhibit. For plants that report planned breaks as downtime, subtract the breaks from neither term; the formula and the checks stay the same.

When downtime plus running stops equaling scheduled time, or the accumulator nears its maximum, fix the time base and the reset logic before trusting any percentage off this panel.

Questions

How long a shift can one 1-second retentive timer hold?

The accumulator tops out at 32767 counts, which is about 9.1 hours on a 1 s time base. An 8-hour shift of 28800 s fits with 3967 s to spare; a 10-hour shift of 36000 s does not fit. For longer shifts, step a counter once per done-bit pulse and roll the pair into the shift total, or accumulate on a slower pulse period sized for the full shift.

Does efficiency percent always equal 100 minus downtime percent?

Yes, as long as downtime is defined as every scheduled production second the machine is not running. The identity falls out of the sum check: running plus downtime equals scheduled, so on one denominator the two percentages sum to 100. If planned breaks are removed from one number but kept in the other, the two displays drift apart by roughly the break share of the shift.

Can the HMI panel own the shift schedule instead of the PLC?

A panel time-and-day event can latch a shift-start tag at 07:00, and entering schedules that way is fair. The risk sits in the failure path: after a panel restart or a dropped link, a missed event leaves the shift bit stale, and a momentary pulse cannot hold shift state. Let the PLC accumulate and divide, give the logic a defined state for a missed event, and use the panel to enter schedules and display results.

Do lockouts for production fixes count as downtime?

Yes, under the definition this page uses: the machine was scheduled to produce and the running input is false, whatever the cause. The clock-driven schedule keeps counting through the lockout, so the lost interval lands in the number. To split causes for reporting, run one retentive timer per cause condition; the cause timers add up to the same shift total, and the percent still comes from the scheduled denominator.

Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.

Keep reading

Build your signAsk for a quote