FREE QA ENGINEERING TOOL
Flaky test rate calculator.
Measure how many distinct tests produce inconsistent outcomes during a defined observation window. Keep flaky tests visible instead of allowing retries to hide the signal.
CALCULATOR
Calculate your baseline
Use one consistent time window and count each test once. A test is inconsistent when it has both a pass and a fail under comparable conditions during that window.
This is a measurement baseline, not an industry benchmark. Compare the same definition across consecutive windows.
How to interpret the result
The calculator uses a test-level rate, not an execution-level failure percentage:
For example, if 18 of 500 distinct tests show both passing and failing outcomes under comparable conditions, the observed flaky test rate is 3.6%. A test that fails 20 times still contributes one test to the numerator.
Collect comparable data
- Choose a fixed observation window, such as the last 7 or 14 days.
- Use the same branch and comparable environment, browser, test configuration and dependency versions where possible.
- Group results by stable test identity. Do not treat retries as new tests.
- Mark a test inconsistent only when both pass and fail outcomes occur in the window. Investigate environment outages and product changes separately.
- Record the first attempt and final attempt separately. A green retry must not erase the original failure.
- Repeat the measurement after remediation using the same definitions and observation window.
What this number does not tell you
A low rate does not prove that the suite is reliable. A short observation window may miss rare failures, and a test that always fails is broken but not flaky. This metric also does not identify root cause, user impact or the cost of investigating failures. Pair it with first-attempt failure rate, retry recovery rate, failure frequency, time to diagnose and escaped defects.
Recommended companion metrics
- First-attempt failure rate: failed first attempts divided by all first attempts.
- Retry recovery rate: failed first attempts that pass on retry divided by all failed first attempts that were retried.
- Flaky test recurrence: how often each known flaky test reappears across observation windows.
- Quarantine age: time a test remains quarantined, with an owner and review date.
Framework-specific evidence
For Playwright, retain traces on retry and inspect the first failure as well as the final result. See the official Playwright retry documentation and Trace Viewer guide. For pytest, use explicit markers and report plugins to make reruns visible rather than silently converting failures into passes.
Frequently asked questions
Should retries count as separate tests?
No. Retries are additional attempts of the same test. Counting them as separate tests inflates the denominator and makes the rate difficult to compare.
Is every failed test flaky?
No. A consistently failing test is a failure, but it is not flaky by this definition. Flakiness means inconsistent outcomes under comparable conditions.
What is a good flaky test rate?
There is no universal threshold that applies to every test suite. Establish a baseline, identify high-impact tests and reduce the rate over time without hiding first-attempt failures.
Does this calculator upload test results?
No. All calculations run in your browser. The values you enter are not submitted to a server.
FROM METRIC TO ACTION
Find the causes behind unreliable tests.
A focused QA Automation Health Check reviews test architecture, reliability and CI evidence, then turns findings into a prioritized improvement plan.
Review a sample report ↗