Small C++ console app that computes Cp/Cpk capability indices from a 1-column text/CSV file.
Repo:
codemark1210/cpktest• Toolchain: MSVC / Visual Studio 2022 • License: MIT
In SPC/quality work you often need a quick, offline check of process capability. This tool prints n, mean, sd, Cp, Cpu/Cpl, Cpk from a measurement list.
- CLI:
--file <path> --lsl <num> --usl <num> - Tolerates comma-separated lines
- Clear error messages (bad path, invalid limits, too few samples)
- Builds with Visual Studio (MSBuild); also works with GCC/Clang
- Open the solution
cpktest.sln. - Set Platform = x64, Configuration = Debug/Release.
- Project → Properties → Debugging
- Working Directory:
$(ProjectDir) - Command Arguments:
--file "$(ProjectDir)example_values.txt" --lsl 9.7 --usl 10.3
- Working Directory:
- Run (Ctrl+F5). You should see an output like:
n : 10
mean : 10.0900
sd : 0.0252
LSL : 9.7000
USL : 10.3000
Cp : 1.9841
Cpu : 2.7718
Cpl : 1.5397
Cpk : 1.5397
Capability grade : Good
example_values.txt (one value per line). Commas in a line are tolerated.
Rules of thumb. Cpk < 1.0 (poor), 1.0–1.33 (marginal), 1.33–1.67 (good), ≥ 1.67 (excellent).
--target / --toleranceargument pair- CSV column selection
- Markdown report export
- Within-sigma (subgroup) option
MIT © 2025 codemark1210