To create a UCL (Upper Control Limit) and LCL (Lower Control Limit) chart in Excel, you must calculate the average of your data and the standard deviation, then create three separate columns for your data points, the average, and the control limits. By plotting these as a line chart, you can visually identify whether a process is in statistical control or if there are outliers that require investigation.
What You'll Need
- Microsoft Excel (any version from 2013 onwards).
- A dataset consisting of a time-series or sequential list of measurements (e.g., daily production weights, hourly temperature readings, or monthly error rates).
- Basic knowledge of the AVERAGE and STDEV.P or STDEV.S functions in Excel.
Step-by-Step
- Organize Your Raw Data: Start by entering your data into two columns. Column A should be your time interval (e.g., Date, Time, or Sample Number) and Column B should be your observed value (the measurement you are tracking). Ensure there are no empty rows or non-numeric characters in your value column, as this will break the calculations.
- Calculate the Process Average (Mean): To establish the center line of your chart, you need the average. In a new cell (for example, D2), enter the formula
=AVERAGE(B2:B100), replacing B2:B100 with the actual range of your data. This value represents the expected performance of your process. - Calculate the Standard Deviation: The control limits are based on the variability of the data. In another cell (e.g., D3), enter
=STDEV.P(B2:B100)if you are analyzing the entire population of data, or=STDEV.S(B2:B100)if you are using a sample of a larger set. The standard deviation tells you how much your data typically deviates from the mean. - Determine the Control Limit Multiplier: In standard statistical process control (SPC), the control limits are typically set at 3 sigma (three standard deviations). This means 99.7% of all data points should fall within these limits if the process is stable. You can use 2 sigma for tighter control or 3 sigma for standard industrial applications.
- Calculate the Upper Control Limit (UCL): In a new column (Column C), you will create a helper column for the UCL. In cell C2, enter the formula
=$D$2 + (3 * $D$3). The dollar signs are critical here; they lock the reference to the average and standard deviation cells so that when you drag the formula down, it always refers to the same limits. - Calculate the Lower Control Limit (LCL): In Column D, create the LCL helper column. In cell D2, enter
=$D$2 - (3 * $D$3). Again, use absolute references (dollar signs) for the mean and standard deviation cells. - Create the Mean Line Column: For the chart to display a flat center line, you need a column where every cell contains the average. In Column E, enter
=$D$2in cell E2 and drag it down to match the length of your data. - Populate All Helper Columns: Select cells C2, D2, and E2, then double-click the small green square (fill handle) at the bottom-right of the selection to automatically fill the formulas down to the end of your dataset. You should now have five columns: Time, Value, UCL, LCL, and Average.
- Insert the Line Chart: Highlight all five columns (including headers). Go to the Insert tab on the ribbon, click the Line Chart icon, and select Line with Markers. This will generate a chart with five lines: your actual data and the three calculated limit lines.
- Format for Clarity: To make the chart professional and readable, right-click the UCL and LCL lines and select Format Data Series. Change the line style to a dashed line and the color to red. Change the Average line to a solid black or blue line. Finally, remove the markers from the UCL, LCL, and Average lines so only the actual data points have markers.
- Add Labels and Titles: Click on the chart, go to Chart Elements (the plus sign), and check Axis Titles and Chart Title. Label the Y-axis with your unit of measurement and the X-axis as Time or Sample Number.
Common Mistakes
One of the most frequent errors is forgetting to use absolute cell references (the $ signs) when calculating the UCL and LCL. If you use relative references, Excel will shift the reference cell down as you drag the formula, resulting in a diagonal line or a series of #VALUE! errors rather than a flat horizontal limit line.
Another common mistake is using the wrong standard deviation formula. Using STDEV.S (Sample) when you have the entire population, or vice versa, can slightly shift your limits. While the difference is often small in large datasets, it can lead to incorrect conclusions in small batches. Additionally, users often forget to remove the markers from the limit lines, which creates a cluttered chart where it is difficult to see the actual data points.
Lastly, some users try to calculate the UCL and LCL manually for every point based on a moving average. While moving range charts exist, a standard UCL/LCL chart requires a static limit based on the baseline performance of the process. Mixing these two methods leads to a chart that doesn't actually signal when a process has drifted.
Tips
To make your chart dynamic, convert your data range into an official Excel Table (select data and press Ctrl+T). When you add new rows of data to a Table, Excel automatically extends the formulas in your UCL, LCL, and Average columns, and the chart will update automatically without you having to redefine the data range.
For better visual analysis, use Conditional Formatting on your raw data column. Set a rule that highlights a cell in red if the value is greater than the UCL cell or less than the LCL cell. This allows you to spot outliers in the spreadsheet before you even look at the chart.
If your data has a natural trend (e.g., it is supposed to increase over time), a standard flat UCL/LCL chart will not work. In those cases, you should calculate the limits based on a rolling average or use a regression line as your center line, calculating the limits based on the residuals (the distance from the regression line).
Troubleshooting
If your chart looks like a vertical wall of lines, check your X-axis. Ensure that the time/date column is formatted as a Date or Number, not as Text. If Excel treats the dates as text, it may plot them incorrectly. You can fix this by selecting the column, going to the Data tab, selecting Text to Columns, and clicking Finish.
If the UCL or LCL lines are not appearing, check your formulas for negative numbers. In some processes (like measuring defects), the LCL calculation might result in a negative number. Since you cannot have negative defects, the LCL should be manually set to zero. Check if your Y-axis is scaled correctly; if your data is between 10 and 20, but your LCL is -50 due to a formula error, the data lines will look like a flat line at the top of the chart.
If the chart is too cluttered to read, try moving the legend to the bottom or removing it entirely and labeling the lines directly using text boxes. If you have thousands of data points, a line chart becomes unreadable. In this case, consider plotting data in weekly or monthly aggregates instead of daily points.
Frequently Asked Questions
What is the difference between a control limit and a specification limit?
Control limits (UCL/LCL) are calculated from the actual performance of the process and tell you what the process is capable of doing. Specification limits are external requirements provided by a customer or engineer that tell you what the process should do. A process can be in statistical control (within UCL/LCL) but still be producing defective parts (outside specification limits).
Why use 3 standard deviations instead of 2?
Using 3 sigma is the industry standard because it minimizes "false alarms." At 3 sigma, there is only a 0.27% chance that a point falls outside the limits due to random chance. If you use 2 sigma, you will see many more points outside the limits, which might lead you to waste time investigating "problems" that are actually just normal random variation.
Can I use this chart for non-numeric data?
No, UCL/LCL charts require continuous numeric data. If you are tracking attributes (like pass/fail or yes/no), you should use a P-chart or a U-chart, which track the proportion or count of defects over time rather than a direct measurement.
What should I do when a point goes outside the UCL or LCL?
A point outside the limits is called an "out-of-control" signal. You should investigate the process at that specific time to find an "assignable cause"—a specific reason why the variation occurred (e.g., a machine malfunction, a change in raw materials, or human error). If no cause is found, the point is considered a random anomaly.
How do I handle missing data points in my chart?
Excel handles missing data in different ways. You can change this by right-clicking the chart, selecting Select Data, clicking Hidden and Empty Cells, and choosing whether to leave gaps, treat empty cells as zero, or connect data points with a line. For control charts, "Connect data points with a line" is usually the best choice to maintain the visual flow.