OEE (Overall Equipment Effectiveness) is calculated as Availability × Performance × Quality. From machine and PLC (programmable logic controller) data you derive the three factors from a running state signal, a total part count and a reject count, combined with two reference values the PLC rarely holds: planned production time and ideal cycle time. The result is only as good as the definitions behind those inputs, so agreeing them in writing comes before any calculation.
What is the OEE formula?
The standard decomposition, consistent with the OEE definition in ISO 22400 Part 2, is:
- Availability = Run time ÷ Planned production time
- Performance = (Ideal cycle time × Total count) ÷ Run time
- Quality = Good count ÷ Total count
- OEE = Availability × Performance × Quality
- Equivalent shortcut: OEE = (Good count × Ideal cycle time) ÷ Planned production time
Which PLC signals and reference data do you need?
Each input has a source and a known failure mode. Map them before writing any calculation code.
| Input | Typical source | Used for | Watch out for |
|---|---|---|---|
| Running state | Cycle active bit, spindle on bit or motor contactor feedback | Run time and Availability | "Running" must be defined with the process engineer, for example cycle active rather than power on |
| Stop reason code | Alarm word or integer register | Downtime Pareto | Codes need a reason list agreed with production |
| Total count | Cycle complete counter in the PLC | Performance and Quality | 16 bit counters wrap at 65,535; PLC restarts may reset them |
| Reject count | Inspection station counter or operator entry | Quality | Often missing in the PLC; may need HMI (human machine interface) or tablet entry |
| Ideal cycle time | Engineering master data per product | Performance | A value slower than reality pushes Performance above 100% |
| Planned production time | Shift calendar in the MES (manufacturing execution system) or a configuration table | Availability | Planned breaks and planned maintenance must be excluded consistently |
| Product or recipe ID | Integer register | Selecting the right ideal cycle time | Changeovers mid shift need time weighted handling |
Worked example with hypothetical numbers
The numbers below are hypothetical and chosen for illustration only. A shift lasts 480 minutes with 30 minutes of planned breaks, so planned production time is 450 minutes. The running state signal shows 45 minutes of stops, so run time is 405 minutes. The ideal cycle time is 30 seconds (0.5 minutes) per part. The PLC counts 720 parts in total, of which 18 are rejected, leaving 702 good parts.
Applying the formula:
- Availability = 405 ÷ 450 = 0.900 (90.0%)
- Performance = (0.5 min × 720) ÷ 405 min = 360 ÷ 405 = 0.889 (88.9%)
- Quality = 702 ÷ 720 = 0.975 (97.5%)
- OEE = 0.900 × 0.889 × 0.975 = 0.780 (78.0%)
- Cross check: (702 × 0.5 min) ÷ 450 min = 351 ÷ 450 = 0.780
Always run the cross check. If the two results differ, one of the inputs (usually run time or counts) is being taken from different time windows. In this example the largest loss is Performance: the machine ran for 405 minutes but produced only what an ideal machine would make in 360 minutes, so 45 minutes were lost to slow cycles and short stops. Availability lost another 45 minutes to recorded stops. Reading the factors this way points the team at speed losses first, which a single 78% figure would not reveal.
How do you compute OEE from PLC data step by step?
A repeatable procedure for one machine, which then becomes a template for the line:
- Step 1: Agree definitions in writing: planned production time, which stops are planned, what "running" means and the ideal cycle time per product.
- Step 2: Map every input to a PLC address or a master data table, using the method in our guide on connecting an existing PLC to an Internet of Things (IoT) dashboard.
- Step 3: Capture state transitions with timestamps. If you poll the state bit, poll well below the duration of the shortest stop you want to count, or read a PLC side stop counter so short stops are not lost between samples.
- Step 4: Convert counters to deltas per interval, handling rollover (for example at 65,535 for a 16 bit counter) and resets after PLC restarts.
- Step 5: Compute the factors per hour and per shift on the edge gateway or server, and store the raw inputs alongside the result so history can be recomputed if definitions change.
- Step 6: Attribute downtime to reason codes and flag unclassified stops for review rather than hiding them.
- Step 7: Validate against manual production records for several shifts and explain every difference before publishing.
- Step 8: Display Availability, Performance and Quality next to the composite OEE, because the composite alone does not tell anyone what to fix.
What mistakes distort OEE?
Common errors in OEE implementations are definition problems, not maths problems:
- Ideal cycle time set to a conservative value, which hides speed losses and can push Performance above 100%.
- Micro stops counted as running because the state bit is sampled too slowly.
- Plant OEE computed as a simple average of machine values instead of weighting by planned production time.
- Changeovers excluded from planned production time in one area and included in another, which makes comparisons meaningless.
- Reject count entered at end of shift and assigned to the wrong hour or product.
What does health monitoring add for computer numerical control (CNC) machines?
OEE needs state and counts; machine health monitoring needs condition data. For a CNC machine that typically means spindle load and speed, axis loads, feed override, alarm history and program number from the controller (often available over MTConnect, OPC UA (Open Platform Communications Unified Architecture) or a vendor API), plus added sensors for spindle vibration and bearing or motor temperature. The two data sets share the same gateway and timestamps, which lets you link a falling Performance factor to a developing mechanical issue. Our CNC machine health page describes that architecture.
Validation checklist
Before OEE is used in management reviews, confirm:
- Written definitions approved by production and engineering.
- Ideal cycle time stored per product and reviewed when tooling or programs change.
- Counter rollover and PLC restart handling tested.
- Short stop detection tested by creating a deliberate short stop.
- Calculated values match manual records for several shifts.
- Raw inputs retained so OEE can be recomputed.
Limitations
OEE suits discrete production with countable parts and a known ideal rate. Continuous process plants usually work with rate and yield measures instead. OEE says nothing about energy, labour or material cost, and a plant level OEE figure compared across sites is only valid when every site uses the same definitions. Treat OEE as a way to find losses on your own equipment over time, not as a benchmark score.
Sources and standards
Standards and specifications referenced in this guide:
- ISO 22400 Part 2 (key performance indicators for manufacturing operations management)
- IEC 61131 Part 3 (PLC programming languages)
- IEC 62541 (OPC UA)
- MTConnect Standard (MTConnect Institute)


