How to calculate Average Handle Time (AHT)
Average handle time is the average length of a customer interaction, including talk time, hold time and the follow-up work after it.
Formula
AHT = (talk time + hold time + after-contact work) ÷ number of interactions handledSQL query
This example assumes: calls(id, agent_id bigint, started_at timestamptz, talk_seconds numeric, hold_seconds numeric, wrap_seconds 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 agent_id,
COUNT(*) AS calls_handled,
AVG(talk_seconds + hold_seconds + wrap_seconds) / 60 AS aht_minutes
FROM calls
WHERE started_at >= CURRENT_DATE - 30
GROUP BY agent_id
ORDER BY aht_minutes DESC;Common mistakes that make Average Handle Time (AHT) wrong
- Leaving out after-call work understates AHT and rewards agents who defer notes.
- Lower is not always better: pressure to shorten calls can reduce resolution quality.
- Transfers can be counted as one handled call or two; apply one rule everywhere.
Ask for Average Handle Time (AHT) 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 handle time per agent over the last 30 days?
- Which call types have the longest handle time?