How to calculate Crash Rate
Crash rate is the share of app or website sessions that end in a crash, whatever the device.
Formula
Crash rate = sessions with a crash ÷ total sessions (crash-free rate = 1 − crash rate)SQL query
This example assumes: sessions(id, user_id bigint, app_version text, started_at timestamptz, crashed boolean). It is written in PostgreSQL syntax; date functions differ slightly in MySQL, BigQuery and SQLite, and your column names will differ from these.
SELECT app_version,
COUNT(*) AS sessions,
COUNT(*) FILTER (WHERE crashed) AS crashed_sessions,
COUNT(*) FILTER (WHERE crashed)::numeric / NULLIF(COUNT(*), 0) AS crash_rate
FROM sessions
WHERE started_at >= CURRENT_DATE - 14
GROUP BY app_version
ORDER BY crash_rate DESC;Common mistakes that make Crash Rate wrong
- Crash rate per session and crash rate per user answer different questions; state which one you use.
- A new version with few sessions has a noisy rate; show the session count beside it.
- Crashes the SDK failed to send are missing, so the true rate is higher than recorded.
Ask for Crash 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 crash rate for each app version over the last 14 days?
- Which version has the highest crash-free session rate?