Skip to main content

CPK stands for process capability index. For those unfamiliar with the term, CPK is a measure of the capability of a process to provide output that is within the process specification limits. In other words, it’s a way to measure whether the thing you’re manufacturing is likely to meet the designed requirements. CPK is used in a wide variety of manufacturing spaces as a way to gauge the reliability of a process.

Oracle APEX is a fantastic platform to perform these type of calculations, as it sits on top of the Oracle database where your data lives (or should be living). Heck, APEX can not only be used to do this kind of reporting; you can design an entire quality control app to capture the data required to perform reporting and calculations like CPK. (We should know: we’ve done exactly that for clients.)

Okay, so to measure CPK, you’re going to need to find a dataset that you can use for the calculation. This should be a measurement that needs to be kept between a certain range, such as the length of a manufactured item or the space between two elements on that item. 10 to 20 data points should be enough for the calculation to work.

Next, you’ll need to define the upper specification limit and lower specification limit. In other words, what is the highest measurement your process should produce and what is the lowest measurement it should produce. Between those numbers is the ideal zone for what you’re measuring.

In this example, I’ll be demonstrating the calculation using PL/SQL.

Start by declaring 8 variables to use:

l_uslnumber; (This is upper specification limit.)
l_lslnumber; (This is lower specification limit.)
l_munumber; (This is mean.)
l_sigmanumber; (This is standard deviation.)
l_cpnumber; (This is capability ratio.)
l_usl_munumber; (This is the difference between upper limit and mean.)
l_mu_lslnumber; (This is the difference between upper limit and mean.)
l_cpknumber; (This is process capability index.)

Set the value of your limits.

select upper, lower
into l_usl, l_lsl
from tolerances;

Next, we’re going to calculate standard deviation and mean and set the variable values.

select avg(data), stddev(data)
into l_mu, l_sigma
from test_data;

Now for our capability ratio and differences.

l_cp:= (l_usl – l_lsl)/(6*l_sigma);
l_usl_mu:= (l_usl – l_mu);
l_mu_lsl:= (l_mu – l_lsl);

Finally our CPK calculation.

l_cpk := least(l_usl_mu, l_mu_lsl)/(3*l_sigma);

And voilà! There you have it — the measure of your process’s ability to produce items to the required specification. The higher the CPK number the better. Generally speaking, Six Sigma manufacturing types will want a result of 2.0 or greater. Less than 1.5 and you’re getting dicey. Less than 1.0, and your process is not reliable.

If you found this interesting and it’s sparking some ideas within your organization, reach out to our team at Traust. We can help you explore ways to leverage your Oracle infrastructure to build enterprise applications and systems to help improve manufacturing processes.