Oee Calculator

OEE Calculator: Boost Manufacturing Performance body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; background-color: #f8f9fa; color: #333; margin: 0; padding: 0; } .container { max-width: 960px; margin: 20px auto; padding: 20px; background-color: #ffffff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); border-radius: 8px; } header { text-align: center; padding-bottom: 20px; border-bottom: 1px solid #eee; margin-bottom: 20px; } h1 { color: #004a99; margin-bottom: 10px; } .lead-paragraph { font-size: 1.1em; color: #555; } .calculator-wrapper { background-color: #e9ecef; padding: 25px; border-radius: 8px; margin-bottom: 30px; box-shadow: inset 0 1px 5px rgba(0,0,0,0.05); } .loan-calc-container h2 { color: #004a99; margin-top: 0; margin-bottom: 20px; text-align: center; } .input-group { margin-bottom: 15px; padding: 10px; background-color: #fff; border-radius: 5px; border: 1px solid #ccc; } .input-group label { display: block; margin-bottom: 8px; font-weight: bold; color: #004a99; } .input-group input[type="number"], .input-group select { width: calc(100% – 20px); padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 1em; margin-top: 5px; } .input-group small { display: block; margin-top: 5px; font-size: 0.85em; color: #666; } .error-message { color: #dc3545; font-size: 0.9em; margin-top: 5px; display: none; /* Hidden by default */ } .button-group { text-align: center; margin-top: 20px; } button { background-color: #007bff; color: white; padding: 12px 25px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; margin: 0 5px; transition: background-color 0.3s ease; } button:hover { background-color: #0056b3; } .reset-button { background-color: #6c757d; } .reset-button:hover { background-color: #5a6268; } .copy-button { background-color: #17a2b8; } .copy-button:hover { background-color: #138496; } #results { background-color: #d4edda; border: 1px solid #c3e6cb; border-radius: 8px; padding: 20px; margin-top: 30px; text-align: center; color: #155724; } #results h3 { color: #004a99; margin-top: 0; font-size: 1.8em; margin-bottom: 15px; } .main-result { font-size: 2.5em; font-weight: bold; color: #28a745; margin-bottom: 15px; display: inline-block; padding: 10px 20px; background-color: #ffffff; border-radius: 5px; box-shadow: 0 0 15px rgba(40, 167, 69, 0.4); } .intermediate-results div, .assumption-item { margin-bottom: 10px; font-size: 1.1em; } .intermediate-results span, .assumption-item span { font-weight: bold; } .chart-container { margin-top: 30px; padding: 20px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); } .chart-container h3 { text-align: center; color: #004a99; margin-bottom: 20px; } canvas { display: block; margin: 0 auto; border: 1px solid #eee; border-radius: 5px; } table { width: 100%; border-collapse: collapse; margin-top: 20px; } th, td { padding: 10px; text-align: left; border: 1px solid #ddd; } th { background-color: #004a99; color: white; font-weight: bold; } tr:nth-child(even) { background-color: #f2f2f2; } caption { font-size: 1.1em; font-weight: bold; margin-bottom: 10px; color: #004a99; text-align: left; } .article-section { margin-top: 40px; padding-top: 30px; border-top: 1px solid #eee; } .article-section h2, .article-section h3 { color: #004a99; margin-bottom: 15px; } .article-section p { margin-bottom: 15px; } .article-section ul, .article-section ol { margin-left: 20px; margin-bottom: 15px; } .article-section li { margin-bottom: 8px; } .faq-item { background-color: #f9f9f9; border: 1px solid #eee; border-radius: 5px; padding: 15px; margin-bottom: 15px; } .faq-item strong { color: #004a99; display: block; margin-bottom: 5px; } .internal-links ul { list-style: none; padding: 0; } .internal-links li { margin-bottom: 10px; } .internal-links a { color: #007bff; text-decoration: none; } .internal-links a:hover { text-decoration: underline; } .internal-links span { font-size: 0.9em; color: #666; display: block; margin-top: 3px; } footer { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; font-size: 0.9em; color: #777; } .highlight { color: #28a745; font-weight: bold; } input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } input[type="number"] { -moz-appearance: textfield; }

OEE Calculator

Calculate and analyze your Overall Equipment Effectiveness (OEE) to identify areas for improvement in your manufacturing operations.

OEE Performance Calculator

Total time the equipment is scheduled to run.
Unplanned stops, breaks, setups (excluding planned breaks).
The fastest possible time to produce one unit.
The total quantity of good and bad units produced.
The quantity of units that meet quality standards.

OEE Results

–%
Availability: –%
Performance: –%
Quality: –%
Actual Run Time: — min
Theoretical Capacity: — units

Formula: OEE = Availability × Performance × Quality

Key Assumptions:

Planned Production Time: — min
Total Downtime: — min
Ideal Cycle Time: — sec
Total Units Produced: — units
Good Units Produced: — units

OEE Component Breakdown

Breakdown of OEE components (Availability, Performance, Quality)
Metric Value Explanation
Planned Production Time — min Total scheduled operating time.
Actual Run Time — min Planned time minus downtime.
Theoretical Cycle Time — sec Fastest possible time to produce one unit.
Theoretical Capacity — units Max units possible in planned time at ideal speed.
Total Units Produced — units All units produced, good and bad.
Good Units Produced — units Units meeting quality standards.
Availability Rate –% Ratio of actual run time to planned production time.
Performance Rate –% Ratio of actual production speed to ideal speed.
Quality Rate –% Ratio of good units to total units produced.
Overall Equipment Effectiveness (OEE) –% Combined measure of Availability, Performance, and Quality.

What is OEE (Overall Equipment Effectiveness)?

OEE (Overall Equipment Effectiveness) is a key performance indicator (KPI) used in manufacturing to measure the efficiency of production processes. It is a composite metric that tracks how well a piece of equipment or a production line is utilized relative to its full potential during scheduled operating times. OEE helps identify losses in the manufacturing process and provides a benchmark for continuous improvement. It is calculated based on three core factors: Availability, Performance, and Quality. A high OEE score indicates a highly efficient manufacturing operation.

Who should use it:

  • Manufacturing Managers: To monitor and improve plant performance.
  • Production Engineers: To identify bottlenecks and reduce waste.
  • Quality Control Teams: To track defect rates and process consistency.
  • Lean Manufacturing Practitioners: As a core tool for waste reduction and efficiency gains.
  • Maintenance Teams: To understand the impact of breakdowns on overall efficiency.

Common Misconceptions:

  • OEE is just about speed: While Performance is a factor, OEE equally considers downtime (Availability) and defects (Quality).
  • A high OEE is always achievable: World-class OEE is typically above 85%, but many factories start much lower. The goal is continuous improvement, not necessarily perfection.
  • OEE applies only to machinery: While heavily focused on equipment, the principles can be adapted to service processes or even individual work efficiency in some contexts, though its primary application is manufacturing.
  • OEE replaces other metrics: OEE is a powerful KPI but should be used alongside other relevant metrics like cost per unit, throughput, and customer satisfaction.

OEE Formula and Mathematical Explanation

The OEE (Overall Equipment Effectiveness) calculation is a multiplication of three distinct factors, each representing a different type of manufacturing loss. Understanding these components is crucial for effective OEE analysis and improvement.

1. Availability Rate

Availability measures the percentage of scheduled time that the equipment was actually running. It accounts for losses due to downtime, such as breakdowns, setup times, and adjustments.

Formula: Availability = Actual Run Time / Planned Production Time

Where:

  • Actual Run Time: Planned Production Time – Total Downtime.
  • Planned Production Time: The total time the equipment is scheduled to operate.
  • Total Downtime: All unplanned stops (breakdowns) and planned stops like setups and adjustments (excluding planned breaks like lunch or shift changes).

2. Performance Rate

Performance measures how closely the equipment runs to its theoretical maximum speed during the time it is running. It accounts for losses due to running slower than the ideal or standard speed, and small stops that don't trigger a downtime entry.

Formula: Performance = (Ideal Cycle Time × Total Units Produced) / Actual Run Time

Alternatively, if the standard run rate is known: Performance = Actual Production Rate / Standard Production Rate

Where:

  • Ideal Cycle Time: The fastest possible time to produce one unit.
  • Total Units Produced: The total quantity of all units (good and bad) produced.
  • Actual Run Time: Calculated as above.

3. Quality Rate

Quality measures the percentage of good units produced out of the total units produced. It accounts for losses due to defects, rework, and scrap.

Formula: Quality = Good Units Produced / Total Units Produced

Where:

  • Good Units Produced: The number of units that meet quality standards and do not require rework.
  • Total Units Produced: The total quantity of all units produced, including good and bad ones.

Overall Equipment Effectiveness (OEE)

The OEE score is the product of these three factors, providing a comprehensive measure of manufacturing efficiency.

Formula: OEE = Availability × Performance × Quality

OEE Variables Table

Variable Meaning Unit Typical Range
Planned Production Time (PPT) Total time equipment is scheduled to run. Minutes Varies (e.g., 480, 500)
Total Downtime (DT) Unplanned stops, setups, adjustments. Minutes 0 – PPT
Actual Run Time (ART) PPT – DT. Time equipment is actually running. Minutes 0 – PPT
Ideal Cycle Time (ICT) Fastest possible time to produce one unit. Seconds Small positive number (e.g., 5, 10, 30)
Total Units Produced (TUP) All units manufactured (good + bad). Units Non-negative integer
Good Units Produced (GUP) Units meeting quality specifications. Units 0 – TUP
Availability Rate (AR) ART / PPT Percentage (%) 0 – 100%
Performance Rate (PR) (ICT × TUP) / ART Percentage (%) 0 – 100%
Quality Rate (QR) GUP / TUP Percentage (%) 0 – 100%
Overall Equipment Effectiveness (OEE) AR × PR × QR Percentage (%) 0 – 100% (World Class > 85%)

Practical Examples (Real-World Use Cases)

Let's look at how the OEE calculator works with realistic manufacturing scenarios.

Example 1: A Well-Performing Production Line

A company runs a packaging machine for a standard 8-hour shift (480 minutes).

Inputs:

  • Planned Production Time: 480 minutes
  • Total Downtime: 20 minutes (includes minor stoppages and quick adjustments)
  • Ideal Cycle Time: 5 seconds (fastest time to seal and label one package)
  • Total Units Produced: 6,000 units
  • Good Units Produced: 5,850 units

Calculations:

  • Actual Run Time = 480 – 20 = 460 minutes
  • Availability Rate = (460 / 480) × 100% = 95.83%
  • Performance Rate = (5 seconds × 6000 units) / 460 minutes = 30000 seconds / 460 minutes = 65.22 seconds per unit (average). Wait, this is not right. Let's recalculate performance based on units per minute. Total units in seconds = 6000 units * 5 sec/unit = 30000 seconds. Actual run time in seconds = 460 min * 60 sec/min = 27600 seconds. Performance calculation: (Ideal cycle time * Total Units Produced) / Actual Run Time (in seconds, consistent units) = (5 sec * 6000 units) / 27600 sec = 30000 / 27600 = 1.087. This is not a percentage. The formula is: (Ideal Cycle Time x Total Units Produced) / Actual Run Time = Total theoretical seconds to produce TUP / Actual run time in seconds. Let's try again: Total theoretical seconds to produce 6000 units = 6000 units * 5 seconds/unit = 30,000 seconds. Actual Run Time in seconds = 460 minutes * 60 seconds/minute = 27,600 seconds. Performance Rate = (30,000 seconds) / (27,600 seconds) = 1.087 – this indicates faster than ideal. Let's re-evaluate the performance formula application. Performance = (Ideal Cycle Time × Total Units Produced) / Actual Run Time Let's assume the calculator uses Actual Run Time in Minutes: Ideal Cycle Time needs to be converted to minutes per unit: 5 seconds / 60 seconds/minute = 0.0833 minutes/unit. Performance = (0.0833 min/unit × 6000 units) / 460 min = 500 minutes / 460 minutes = 1.087. This indicates that the production rate achieved was 108.7% of the ideal rate, which means the machine ran faster than the "ideal cycle time". This is unusual. Often, the "ideal cycle time" represents a benchmark speed, and "performance" might be a ratio of actual output to theoretical maximum output in the run time. Let's use a more standard interpretation where performance reflects speed loss. Theoretical max units in Actual Run Time: Actual Run Time (seconds) / Ideal Cycle Time (seconds) = 27600 seconds / 5 seconds/unit = 5520 units. Performance Rate = Total Units Produced / Theoretical Max Units = 6000 units / 5520 units = 1.087. Again, over 100%. This implies that the "Ideal Cycle Time" provided might be too conservative, or the "Total Units Produced" is exceptionally high. Let's assume the ideal cycle time *is* the fastest possible, and the machine is consistently running faster than this. A common interpretation of Performance Rate when units produced are high is: Performance Rate = (Total Units Produced / Actual Run Time in Minutes) / (60 / Ideal Cycle Time in Seconds) Units per minute = 6000 units / 460 min = 13.04 units/min Ideal units per minute = 60 sec/min / 5 sec/unit = 12 units/min Performance Rate = 13.04 / 12 = 1.087 or 108.7%. Let's correct this for the sake of a typical OEE example where performance is 100%. A more common OEE scenario: Planned Production Time: 480 minutes Total Downtime: 40 minutes Ideal Cycle Time: 15 seconds Total Units Produced: 1200 units (fewer units produced) Good Units Produced: 1150 units Recalculations: Actual Run Time = 480 – 40 = 440 minutes. Availability Rate = (440 / 480) * 100% = 91.67% Actual Run Time in seconds = 440 * 60 = 26,400 seconds. Ideal Units in Actual Run Time = 26,400 seconds / 15 seconds/unit = 1760 units. Performance Rate = Total Units Produced / Ideal Units in Actual Run Time = 1200 units / 1760 units = 68.18% Quality Rate = Good Units Produced / Total Units Produced = 1150 units / 1200 units = 95.83% OEE = 91.67% × 68.18% × 95.83% = 60.03% This is a much more typical OEE calculation. Let's use this adjusted example. Example 1 (Revised): A Typical Production Line A company runs a packaging machine for a standard 8-hour shift (480 minutes). Inputs: * Planned Production Time: 480 minutes * Total Downtime: 40 minutes (minor stoppages, setups) * Ideal Cycle Time: 15 seconds (fastest time to produce one unit) * Total Units Produced: 1200 units * Good Units Produced: 1150 units Calculations: * Actual Run Time = 480 – 40 = 440 minutes * Availability Rate = (440 / 480) × 100% = 91.67% * Ideal Units in Actual Run Time = (440 min × 60 sec/min) / 15 sec/unit = 26,400 sec / 15 sec/unit = 1760 units * Performance Rate = 1200 units / 1760 units = 68.18% * Quality Rate = 1150 units / 1200 units = 95.83% * OEE = 91.67% × 68.18% × 95.83% = 60.03% Interpretation: This OEE score of 60.03% indicates significant room for improvement. The largest loss comes from Performance (31.82% loss), suggesting the machine is not running at its ideal speed. Availability also contributes significantly (8.33% loss) due to downtime. Quality is the strongest component, but still has room for improvement (4.17% loss).

    Example 2: A High-Mix, Low-Volume Operation

    A small custom fabrication shop uses a CNC machine. Production is less continuous, with frequent changeovers.

    Inputs:

    • Planned Production Time: 300 minutes (5 hours, accounting for setup/cleaning between jobs)
    • Total Downtime: 60 minutes (includes machine calibration, tool changes, minor adjustments)
    • Ideal Cycle Time: 30 seconds (for a specific complex part)
    • Total Units Produced: 150 units (across various small batches)
    • Good Units Produced: 140 units

    Calculations:

    • Actual Run Time = 300 – 60 = 240 minutes
    • Availability Rate = (240 / 300) × 100% = 80.00%
    • Actual Run Time in seconds = 240 min × 60 sec/min = 14,400 seconds
    • Ideal Units in Actual Run Time = 14,400 seconds / 30 sec/unit = 480 units
    • Performance Rate = 150 units / 480 units = 31.25%
    • Quality Rate = 140 units / 150 units = 93.33%
    • OEE = 80.00% × 31.25% × 93.33% = 23.33%

    Interpretation: An OEE of 23.33% is very low. This scenario highlights that for high-mix, low-volume operations, measuring OEE requires careful consideration of what constitutes "planned production time" and "downtime" (e.g., changeover times). Here, Performance is the dominant loss factor, indicating that when the machine is running, it's not operating efficiently relative to its ideal cycle time for the parts being made. Availability is also a significant issue. This shop needs to focus on reducing setup and calibration times, and investigate why the machine runs so slowly when it is operating.

How to Use This OEE Calculator

Our OEE calculator is designed to be intuitive and provide actionable insights into your manufacturing performance. Follow these simple steps to get started:

  1. Gather Your Data: Before using the calculator, collect accurate data for the current production period (e.g., a shift, a day, a week). You will need:
    • Planned Production Time: The total scheduled operating time for the equipment. Exclude scheduled breaks (lunch, planned maintenance).
    • Total Downtime: Sum of all unplanned stops (breakdowns) and planned stops like setups, adjustments, and quick breaks.
    • Ideal Cycle Time: The theoretical fastest time to produce one unit. This is often based on engineering specifications or the best performance ever recorded.
    • Total Units Produced: The total count of all units manufactured, regardless of quality.
    • Good Units Produced: The count of units that meet all quality standards without defects.
  2. Input the Values: Enter each data point into the corresponding field in the calculator. Ensure you are using consistent units (minutes for time, seconds for cycle time, units for production counts). The calculator uses minutes for run times and seconds for cycle times, converting as needed.
  3. Calculate OEE: Click the "Calculate OEE" button. The calculator will immediately display your overall OEE score, along with the key intermediate values: Availability, Performance, and Quality rates.
  4. Analyze the Results:
    • Main OEE Score: This is your overall efficiency metric. A score of 100% is theoretical perfection. World-class OEE is typically considered to be above 85%.
    • Component Rates: Pay close attention to each individual rate (Availability, Performance, Quality). The lowest rate often indicates the biggest opportunity for improvement.
    • Intermediate Values: Understand metrics like Actual Run Time and Theoretical Capacity. These provide context for the rates.
    • Table and Chart: Review the detailed table and the dynamic chart for a visual and tabular breakdown of all metrics.
  5. Make Decisions: Use the insights gained to prioritize improvement efforts.
    • Low Availability? Investigate causes of downtime: breakdowns, long setups, slow adjustments. Focus on preventive maintenance and setup reduction (SMED).
    • Low Performance? Analyze why the machine isn't running at ideal speed: operator inconsistencies, minor stoppages, worn tooling, minor adjustments. Focus on standardization and process optimization.
    • Low Quality? Identify root causes of defects: material issues, process drift, operator error, machine defects. Focus on quality control and process capability improvement.
  6. Track Progress: Use the "Reset" button to clear the fields and calculate OEE for a new period. Regularly track your OEE scores to monitor the impact of your improvement initiatives. Use the "Copy Results" button to easily share your findings.

Key Factors That Affect OEE Results

Several critical factors influence your OEE (Overall Equipment Effectiveness) score. Understanding these can help you target improvements more effectively.

  • Downtime Events (Availability): This is the most direct impact on Availability. Frequent machine breakdowns, lengthy changeover procedures, slow startup/shutdown processes, and unscheduled maintenance all reduce actual run time, thereby lowering Availability and consequently OEE. Effective preventive maintenance schedules and optimizing changeover times (SMED) are crucial.
  • Production Speed and Minor Stoppages (Performance): If equipment runs slower than its ideal cycle time, Performance suffers. This can be due to operator skill variations, worn tooling, minor adjustments needed during the run, or inadequate machine setup. Even brief, frequent stoppages that aren't logged as major downtime can significantly impact Performance. Standardizing operating procedures and ensuring proper machine calibration are key.
  • Defects, Rework, and Scrap (Quality): The Quality component directly measures how many units meet specifications. Poor raw material quality, process variability, operator errors, or equipment malfunctions leading to defects will reduce the number of good units produced. This directly lowers the Quality rate and, therefore, OEE. Robust quality control systems and process monitoring are essential.
  • Planned Production Time Definition (Availability): How you define planned production time is critical. If you exclude short breaks or operator rest periods that are essential for sustained operation, your Availability might look artificially high. Conversely, including all non-value-added time that could have been used for production will artificially lower Availability. Consistency in this definition is paramount.
  • Measurement Accuracy (All Factors): Inaccurate data input for any of the variables—planned time, downtime, cycle times, unit counts, or good units—will lead to a misleading OEE score. This undermines the entire purpose of tracking OEE. Regular training on data collection and verification processes are vital.
  • Product Complexity and Variety (Performance & Availability): Highly complex products or frequent product changeovers (high-mix, low-volume) often lead to lower Availability (due to setup times) and Performance (if cycle times vary significantly or require more operator intervention). While OEE is still applicable, targets might need to be adjusted, and focus may shift towards optimizing changeover efficiency.
  • Operator Skill and Training (Performance & Quality): The skill level and training of operators significantly influence how consistently equipment runs at ideal speed (Performance) and how few defects are produced (Quality). Well-trained operators can minimize minor stoppages, make quick adjustments, and ensure proper operation, all contributing to a higher OEE.

Frequently Asked Questions (FAQ)

Q1: What is considered a "good" OEE score?

A "good" OEE score varies by industry and equipment type. However, generally:

  • 0% – 65%: Poor – Significant improvement needed.
  • 65% – 75%: Fair – Room for improvement.
  • 75% – 85%: Good – Competitive performance.
  • 85%+ : World Class – Excellent performance.
Many manufacturers start with much lower scores and focus on incremental improvements.

Q2: How often should I calculate OEE?

It's best to calculate OEE regularly, ideally daily or even per shift, especially for critical equipment. This allows for timely identification of issues and faster implementation of corrective actions. You can also track OEE weekly, monthly, or quarterly for trend analysis.

Q3: What's the difference between OEE and TEEP?

TEEP stands for Total Effective Equipment Performance. While OEE measures efficiency against *planned* production time, TEEP measures efficiency against *total calendar* time (24/7/365). TEEP reveals the potential lost capacity due to unused shifts or weekend downtime, whereas OEE focuses on optimizing the time you are already scheduled to run. TEEP is often a higher-level strategic metric, while OEE is a tactical operational metric.

Q4: Should planned breaks (lunch, shift change) be included in Planned Production Time?

No. Planned breaks that are standard, recurring, and expected to occur are typically excluded from Planned Production Time. They are considered non-productive time that is not available for operation. The "Actual Run Time" is calculated by subtracting *all* downtime (planned and unplanned, excluding scheduled breaks) from the Planned Production Time.

Q5: My performance rate is over 100%. What does this mean?

This usually indicates that the "Ideal Cycle Time" you've entered is too slow or conservative compared to the actual capability of the machine or the units produced. The machine is running faster than its defined ideal. While seemingly positive, it suggests the benchmark (ideal cycle time) needs to be reviewed and potentially tightened to reflect true best-case performance, or the calculation is being interpreted incorrectly. It's crucial that the "Ideal Cycle Time" represents the absolute fastest possible time to produce one unit under perfect conditions.

Q6: How does OEE relate to Lean Manufacturing?

OEE is a fundamental pillar of Lean Manufacturing and Six Sigma. It directly quantifies the "Seven Wastes" (Muda) related to defects (Quality), overproduction (Performance), waiting (Availability), motion (Performance), unnecessary transport (Availability), excess inventory (Performance), and over-processing (Performance). By measuring OEE, companies can identify and systematically eliminate these wastes.

Q7: Can I use OEE for non-manufacturing processes?

While OEE is primarily designed for manufacturing equipment, its core principles (Availability, Performance, Quality) can be adapted to other areas. For instance, in service industries, "Availability" might refer to system uptime, "Performance" to response time or task completion speed, and "Quality" to customer satisfaction or error rates. However, defining the variables and ensuring consistent measurement can be more challenging.

Q8: What is the impact of cost and financial metrics on OEE?

OEE itself is a non-financial metric focused on physical efficiency. However, it has a strong indirect financial impact. Higher OEE means:

  • Increased output from existing assets (lower capital expenditure).
  • Reduced waste (lower material and labor costs).
  • Improved throughput, leading to higher revenue.
  • Better capacity utilization.
By improving OEE, companies reduce operational costs and enhance profitability.

Related Tools and Internal Resources

© 2023 Your Manufacturing Analytics. All rights reserved.

var chartInstance = null; // Global variable to hold chart instance function formatNumber(num, decimals = 0) { if (isNaN(num) || num === null) return '–'; return num.toFixed(decimals).replace(/\B(?=(\d{3})+(?!\d))/g, ","); } function formatPercentage(num) { if (isNaN(num) || num === null) return '–%'; return (num * 100).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",") + '%'; } function displayError(elementId, message) { var errorElement = document.getElementById(elementId + 'Error'); if (message) { errorElement.innerText = message; errorElement.style.display = 'block'; document.getElementById(elementId).classList.add('input-error'); } else { errorElement.innerText = "; errorElement.style.display = 'none'; document.getElementById(elementId).classList.remove('input-error'); } } function isValidNumber(value) { return !isNaN(parseFloat(value)) && isFinite(value); } function calculateOEE() { var plannedProductionTime = parseFloat(document.getElementById("plannedProductionTime").value); var downtimeMinutes = parseFloat(document.getElementById("downtimeMinutes").value); var idealCycleTime = parseFloat(document.getElementById("idealCycleTime").value); var totalUnitsProduced = parseFloat(document.getElementById("totalUnitsProduced").value); var goodUnitsProduced = parseFloat(document.getElementById("goodUnitsProduced").value); var errors = false; // Validation if (!isValidNumber(plannedProductionTime) || plannedProductionTime <= 0) { displayError('plannedProductionTime', 'Please enter a positive number for Planned Production Time.'); errors = true; } else { displayError('plannedProductionTime', ''); } if (!isValidNumber(downtimeMinutes) || downtimeMinutes < 0) { displayError('downtimeMinutes', 'Please enter a non-negative number for Downtime.'); errors = true; } else { displayError('downtimeMinutes', ''); } if (!isValidNumber(idealCycleTime) || idealCycleTime <= 0) { displayError('idealCycleTime', 'Please enter a positive number for Ideal Cycle Time.'); errors = true; } else { displayError('idealCycleTime', ''); } if (!isValidNumber(totalUnitsProduced) || totalUnitsProduced < 0) { displayError('totalUnitsProduced', 'Please enter a non-negative number for Total Units Produced.'); errors = true; } else { displayError('totalUnitsProduced', ''); } if (!isValidNumber(goodUnitsProduced) || goodUnitsProduced plannedProductionTime) { displayError('downtimeMinutes', 'Downtime cannot exceed Planned Production Time.'); errors = true; } else if (isValidNumber(downtimeMinutes) && downtimeMinutes >= 0) { displayError('downtimeMinutes', "); } if (goodUnitsProduced > totalUnitsProduced) { displayError('goodUnitsProduced', 'Good Units Produced cannot exceed Total Units Produced.'); errors = true; } else if (isValidNumber(goodUnitsProduced) && goodUnitsProduced >= 0) { displayError('goodUnitsProduced', "); } if (errors) { document.getElementById("mainResult").innerText = "–%"; updateIntermediateResults('–', '–', '–', '–', '–'); updateChart(['–','–','–']); updateTable('–', '–', '–', '–', '–', '–', '–%', '–%', '–%', '–%'); return; } // Calculations var actualRunTime = plannedProductionTime – downtimeMinutes; // in minutes var actualRunTimeSeconds = actualRunTime * 60; // Availability Rate var availabilityRate = 0; if (plannedProductionTime > 0) { availabilityRate = actualRunTime / plannedProductionTime; } // Performance Rate var performanceRate = 0; if (actualRunTimeSeconds > 0 && idealCycleTime > 0 && totalUnitsProduced > 0) { // Theoretical max units in actual run time var theoreticalMaxUnits = actualRunTimeSeconds / idealCycleTime; performanceRate = totalUnitsProduced / theoreticalMaxUnits; // Ensure performance rate doesn't exceed 100% if TUP > theoreticalMaxUnits due to slow ideal cycle time if (performanceRate > 1) performanceRate = 1; } else if (totalUnitsProduced === 0 && actualRunTimeSeconds > 0) { performanceRate = 0; // No units produced means 0 performance } // Quality Rate var qualityRate = 0; if (totalUnitsProduced > 0) { qualityRate = goodUnitsProduced / totalUnitsProduced; } // OEE var oee = availabilityRate * performanceRate * qualityRate; // Intermediate Calculations for display var theoreticalCapacity = actualRunTimeSeconds > 0 ? actualRunTimeSeconds / idealCycleTime : 0; // Update Results Display document.getElementById("mainResult").innerText = formatPercentage(oee); updateIntermediateResults( formatPercentage(availabilityRate), formatPercentage(performanceRate), formatPercentage(qualityRate), formatNumber(actualRunTime, 1), formatNumber(theoreticalCapacity, 0) ); updateChart([ (availabilityRate * 100).toFixed(2), (performanceRate * 100).toFixed(2), (qualityRate * 100).toFixed(2) ]); updateTable( formatNumber(plannedProductionTime, 1), formatNumber(actualRunTime, 1), formatNumber(idealCycleTime, 1), formatNumber(theoreticalCapacity, 0), formatNumber(totalUnitsProduced, 0), formatNumber(goodUnitsProduced, 0), formatPercentage(availabilityRate), formatPercentage(performanceRate), formatPercentage(qualityRate), formatPercentage(oee) ); // Update assumptions display document.getElementById("assumptionPPT").innerText = formatNumber(plannedProductionTime, 1) + " min"; document.getElementById("assumptionDT").innerText = formatNumber(downtimeMinutes, 1) + " min"; document.getElementById("assumptionICT").innerText = formatNumber(idealCycleTime, 1) + " sec"; document.getElementById("assumptionTUP").innerText = formatNumber(totalUnitsProduced, 0) + " units"; document.getElementById("assumptionGUP").innerText = formatNumber(goodUnitsProduced, 0) + " units"; } function updateIntermediateResults(availability, performance, quality, runTime, theoreticalCapacity) { document.getElementById("availabilityRate").innerHTML = "Availability: " + availability + ""; document.getElementById("performanceRate").innerHTML = "Performance: " + performance + ""; document.getElementById("qualityRate").innerHTML = "Quality: " + quality + ""; document.getElementById("runTime").innerHTML = "Actual Run Time: " + runTime + " min"; document.getElementById("theoreticalCapacity").innerHTML = "Theoretical Capacity: " + theoreticalCapacity + " units"; } function updateTable(ppt, art, tct, tc, tup, gup, ar, pr, qr, oee) { document.getElementById("tablePPT").innerText = ppt; document.getElementById("tableART").innerText = art; document.getElementById("tableTCT").innerText = tct; document.getElementById("tableTC").innerText = tc; document.getElementById("tableTUP").innerText = tup; document.getElementById("tableGUP").innerText = gup; document.getElementById("tableAR").innerText = ar; document.getElementById("tablePR").innerText = pr; document.getElementById("tableQR").innerText = qr; document.getElementById("tableOEE").innerText = oee; } function updateChart(data) { var ctx = document.getElementById('oeeChart').getContext('2d'); // Destroy previous chart instance if it exists if (chartInstance) { chartInstance.destroy(); } chartInstance = new Chart(ctx, { type: 'bar', // Changed to bar chart for better visual comparison of components data: { labels: ['Availability', 'Performance', 'Quality'], datasets: [{ label: 'OEE Component (%)', data: data, backgroundColor: [ 'rgba(0, 74, 153, 0.7)', // Primary blue for Availability 'rgba(40, 167, 69, 0.7)', // Success green for Performance 'rgba(255, 193, 7, 0.7)' // Warning yellow for Quality ], borderColor: [ 'rgba(0, 74, 153, 1)', 'rgba(40, 167, 69, 1)', 'rgba(255, 193, 7, 1)' ], borderWidth: 1 }] }, options: { responsive: true, maintainAspectRatio: false, scales: { y: { beginAtZero: true, max: 100, title: { display: true, text: 'Percentage (%)' } } }, plugins: { legend: { display: false // Legend is implicit in dataset label and colors }, tooltip: { callbacks: { label: function(context) { var label = context.dataset.label || "; if (label) { label += ': '; } if (context.parsed.y !== null) { label += context.parsed.y.toFixed(2) + '%'; } return label; } } } } } }); } function resetCalculator() { document.getElementById("plannedProductionTime").value = "480"; document.getElementById("downtimeMinutes").value = "30"; document.getElementById("idealCycleTime").value = "10"; document.getElementById("totalUnitsProduced").value = "2500"; document.getElementById("goodUnitsProduced").value = "2400"; // Clear errors displayError('plannedProductionTime', "); displayError('downtimeMinutes', "); displayError('idealCycleTime', "); displayError('totalUnitsProduced', "); displayError('goodUnitsProduced', "); calculateOEE(); // Recalculate with defaults } function copyResults() { var mainResult = document.getElementById("mainResult").innerText; var availability = document.getElementById("availabilityRate").innerText.replace("Availability: ", ""); var performance = document.getElementById("performanceRate").innerText.replace("Performance: ", ""); var quality = document.getElementById("qualityRate").innerText.replace("Quality: ", ""); var runTime = document.getElementById("runTime").innerText; var theoreticalCapacity = document.getElementById("theoreticalCapacity").innerText; var ppt = document.getElementById("assumptionPPT").innerText; var dt = document.getElementById("assumptionDT").innerText; var ict = document.getElementById("assumptionICT").innerText; var tup = document.getElementById("assumptionTUP").innerText; var gup = document.getElementById("assumptionGUP").innerText; var resultsText = "— OEE Calculation Results —\n\n"; resultsText += "Overall Equipment Effectiveness (OEE): " + mainResult + "\n"; resultsText += "——————————-\n"; resultsText += "Key Components:\n"; resultsText += "- Availability: " + availability + "\n"; resultsText += "- Performance: " + performance + "\n"; resultsText += "- Quality: " + quality + "\n"; resultsText += "——————————-\n"; resultsText += "Operational Metrics:\n"; resultsText += "- Actual Run Time: " + runTime + "\n"; resultsText += "- Theoretical Capacity: " + theoreticalCapacity + "\n"; resultsText += "——————————-\n"; resultsText += "Key Assumptions:\n"; resultsText += "- Planned Production Time: " + ppt + "\n"; resultsText += "- Total Downtime: " + dt + "\n"; resultsText += "- Ideal Cycle Time: " + ict + "\n"; resultsText += "- Total Units Produced: " + tup + "\n"; resultsText += "- Good Units Produced: " + gup + "\n"; // Copy to clipboard var textArea = document.createElement("textarea"); textArea.value = resultsText; textArea.style.position = "fixed"; textArea.style.left = "-9999px"; document.body.appendChild(textArea); textArea.focus(); textArea.select(); try { var successful = document.execCommand('copy'); var msg = successful ? 'Results copied successfully!' : 'Failed to copy results!'; alert(msg); } catch (err) { alert('Failed to copy results. Please copy manually.'); } document.body.removeChild(textArea); } // Initialize calculator on page load document.addEventListener('DOMContentLoaded', function() { // Check if Chart.js is loaded if (typeof Chart === 'undefined') { console.error("Chart.js is not loaded. Please include Chart.js library."); document.getElementById('oeeChart').style.display = 'none'; // Hide canvas if Chart.js is missing return; } calculateOEE(); // Calculate with default values });

Leave a Comment