The cost of quality can be derived using an equation. It is the sum of cost of good quality (CoGQ) and cost of poor quality (CoPQ).