Quality costs are expenses directly related to maintaining or improving the level of quality of a product or service. Synonyms for this term may include assurance costs, which refers to the investment made in processes and systems to ensure consistent and reliable product or service output. Prevention costs involve expenses incurred in preventing defects and other quality issues from arising in the first place. Appraisal costs are related to inspection, testing, and other quality control processes used to detect and measure the level of quality achieved. Finally, failure costs refer to expenses incurred due to defects or problems that result in rework, repair, or customer returns.