How to calculate Average Resolution Time

Average resolution time is how long, on average, it takes to fully resolve a support ticket.

Formula

Resolution time = resolved timestamp − created timestamp, averaged over resolved tickets

SQL query

This example assumes: tickets(id, created_at, resolved_at, category). It is written in PostgreSQL syntax; date functions differ slightly in MySQL, BigQuery and SQLite, and your column names will differ from these.

SELECT category,
       COUNT(*) AS resolved,
       AVG(EXTRACT(EPOCH FROM (resolved_at - created_at)) / 3600) AS avg_hours,
       PERCENTILE_CONT(0.9) WITHIN GROUP (
         ORDER BY EXTRACT(EPOCH FROM (resolved_at - created_at)) / 3600) AS p90_hours
FROM tickets
WHERE resolved_at IS NOT NULL
GROUP BY category
ORDER BY avg_hours DESC;

Common mistakes that make Average Resolution Time wrong

  • Time waiting for the customer to reply is usually excluded from team performance; decide on it.
  • Tickets still open are excluded, which flatters the average.
  • A handful of very long tickets pull the mean; use the median or 90th percentile.

Ask for Average Resolution Time 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 average resolution time by ticket category?
  • Which categories have the longest 90th percentile?

Frequently asked questions

What is Average Resolution Time?
Average resolution time is how long, on average, it takes to fully resolve a support ticket.
How do you calculate Average Resolution Time?
Resolution time = resolved timestamp − created timestamp, averaged over resolved tickets. The SQL example on this page shows the same calculation against a simple table.
What commonly goes wrong when calculating Average Resolution Time?
Time waiting for the customer to reply is usually excluded from team performance; decide on it.