How to calculate Scrap Rate

Scrap rate is the share of units produced that cannot be sold or reworked and are discarded.

Formula

Scrap rate = scrapped units ÷ total units produced (good + scrapped)

SQL query

This example assumes: production_runs(id, run_date date, line text, units_produced numeric, units_scrapped numeric). It is written in PostgreSQL syntax; date functions differ slightly in MySQL, BigQuery and SQLite, and your column names will differ from these.

SELECT line,
       SUM(units_produced) AS produced,
       SUM(units_scrapped) AS scrapped,
       SUM(units_scrapped) / NULLIF(SUM(units_produced), 0) AS scrap_rate
FROM production_runs
WHERE run_date >= CURRENT_DATE - 90
GROUP BY line
ORDER BY scrap_rate DESC;

Common mistakes that make Scrap Rate wrong

  • Decide whether units_produced includes the scrapped units, or the rate will be off by the scrap share.
  • Reworked units are not scrap; keep them in a separate column.
  • Scrap measured in weight and scrap measured in units are different rates.

Ask for Scrap Rate in plain English

Instead of writing the query yourself, you can type the question. SchemaChat turns it into SQL against your connected database or uploaded file, runs it, and shows the SQL and the figures it used so you can check the answer before you share it. It does not replace your judgement about the definition: check that the query matches the formula your business uses.

  • What is the scrap rate for each production line over the last 90 days?
  • Which line had the highest scrap rate last month?

Frequently asked questions

What is Scrap Rate?
Scrap rate is the share of units produced that cannot be sold or reworked and are discarded.
How do you calculate Scrap Rate?
Scrap rate = scrapped units ÷ total units produced (good + scrapped). The SQL example on this page shows the same calculation against a simple table.
What commonly goes wrong when calculating Scrap Rate?
Decide whether units_produced includes the scrapped units, or the rate will be off by the scrap share.