How to calculate Throughput

Throughput is the number of units a process completes in a given time.

Formula

Throughput = units completed ÷ time period

SQL query

This example assumes: completions(unit_id, line, completed_at). 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,
       DATE_TRUNC('day', completed_at) AS day,
       COUNT(*)                        AS units_completed
FROM completions
WHERE completed_at >= CURRENT_DATE - 30
GROUP BY line, 2
ORDER BY line, 2;

Common mistakes that make Throughput wrong

  • Days with zero output do not appear in a GROUP BY; join to a calendar if you need them.
  • Compare lines over equal working hours, or a line that ran longer looks better.
  • Work-in-progress counted as complete overstates throughput.

Ask for Throughput 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 daily throughput by line for the last 30 days?
  • Which days had the lowest throughput?

Frequently asked questions

What is Throughput?
Throughput is the number of units a process completes in a given time.
How do you calculate Throughput?
Throughput = units completed ÷ time period. The SQL example on this page shows the same calculation against a simple table.
What commonly goes wrong when calculating Throughput?
Days with zero output do not appear in a GROUP BY; join to a calendar if you need them.