A/B testing Calculator: Sample Ratio Mismatch (SRM) Checker

Check traffic distribution balance in A/B tests. Online tool for fast and accurate SRM diagnostics. Just enter the numbers and get the result.

Check SRM for groups

Group 1

Group 2

SRM Result

Chi-Square Value

1.2195

P-value

p = 0.2695

No evidence of a Sample Ratio Mismatch with a p = 0.2695

Save Result

https://devbox.tools/utils/sample-ratio-mismatch-calculator/#!groups=1000%3A0.5%7C1050%3A0.5

Features of the "Sample Ratio Mismatch Calculator"

Chi-Squared Statistical Analysis

Uses chi-squared statistics to calculate the degree of mismatch between expected and actual traffic distribution in A/B tests.

Real-Time SRM Detection

Instantly detects when traffic distribution deviates from planned proportions, helping maintain test integrity.

Clear Status Indicators

Provides color-coded status indicators (normal, warning, critical) for quick assessment of distribution issues.

Guide & Usage Details

What Is Sample Ratio Mismatch (SRM)?

Sample Ratio Mismatch (SRM) is a statistical validation that determines whether the actual distribution of users across A/B test variants matches the planned allocation.

If the observed distribution differs significantly from the expected one, it may indicate problems with randomization, event logging, experiment configuration, or data collection. SRM validation should be performed before analyzing experiment results, because the presence of SRM may make the conclusions of an A/B test unreliable.

The tool uses the Chi-Square (χ²) test to compare the expected and observed group sizes and automatically calculates the p-value.

What the Tool Shows

After the calculation, the following results are displayed:

Metric

Description

Chi-Square Statistic

The χ² test statistic used to evaluate the distribution

p-value

The probability that the observed deviation occurred by chance

Validation Status

Indicates whether Sample Ratio Mismatch is detected

Calculation Link

A shareable link that preserves the validation parameters

How to Use the Tool

  1. Enter the actual number of users in each group.

  2. Specify the planned allocation ratio for each group.

  3. Add additional experiment variants if necessary.

  4. Run the validation.

  5. Review the results.

For example, if an experiment was designed with a 50% / 50% traffic split but the observed group sizes are 1,000 and 1,050 users, the tool evaluates whether this deviation can reasonably be explained by random variation.

When to Check for SRM

SRM validation is particularly useful:

  • before analyzing the results of any A/B test;

  • after deploying a new user allocation mechanism;

  • when running experiments with multiple variants;

  • when analytics event loss is suspected;

  • after modifying the event logging system;

  • after changing the randomization mechanism;

  • when group sizes differ unexpectedly.

In many organizations, SRM validation is a mandatory step before analyzing any experiment.

Why Sample Ratio Mismatch Occurs

The most common causes include:

  • user randomization errors;

  • incorrectly configured feature flags;

  • experiment platform issues;

  • analytics event loss;

  • filtering out certain users;

  • user identification errors;

  • cookie or authentication issues;

  • incorrect traffic allocation;

  • software bugs.

SRM itself does not identify the root cause—it only indicates that the observed user distribution differs from the expected allocation.

When You Can Trust A/B Test Results

If SRM is detected, the experiment results should be interpreted with extreme caution.

Even if the observed differences between variants appear statistically significant, they may be caused by user allocation problems rather than by the product change itself.

In practice, teams usually investigate and resolve the cause of the SRM before rerunning the experiment.

Tool Limitations

The tool validates only the correctness of user allocation across experiment groups.

It does not determine which variant performs better, compare conversion rates, or estimate effect size.

SRM validation also does not identify the source of the problem—it only indicates that the observed allocation differs statistically from the expected one.

Conclusion

The Sample Ratio Mismatch Calculator provides a quick way to verify whether users were distributed correctly across experiment variants. It is one of the first validation steps in any A/B test and helps identify implementation issues before analyzing product metrics.

For comprehensive experiment analysis, use this tool together with other statistical calculators. Before launching an experiment, estimate the required sample size using the Sample Size Calculator. Once the SRM check has passed successfully, analyze the experiment results using the Two-Sample T-Test for continuous metrics or the Chi-Square Test for conversion rates and other binary metrics.

Tool Description

alien

The SRM calculator helps detect issues in A/B testing experiments by analyzing traffic distribution between test groups. It uses chi-squared statistics to identify statistical anomalies that may affect test validity.

This tool is essential for data specialists, analysts, and marketers who need to ensure the integrity of their A/B tests. It helps identify when traffic distribution deviates from expected proportions.

The calculator provides clear interpretation of results with color-coded status indicators, making it easy to understand when intervention is needed to maintain test quality.

Frequently Asked Questions (FAQ)

Sample Ratio Mismatch (SRM) occurs when the observed participant counts across experiment groups differ significantly from the planned allocation ratios. It can indicate problems with randomization, assignment, tracking, or data loss and can invalidate test results.

Enter the actual participant count and planned allocation proportion for each group. The calculator uses a chi-square test to compare observed and expected counts, then reports the chi-square value, p-value, and SRM status.

Add at least two groups, enter each group’s actual count and planned proportion, and make sure the planned proportions total 1. Then calculate SRM. A low p-value indicates that the observed allocation is unlikely to be explained by random variation alone.

Yes, the calculator is suitable not only for classic A/B tests but also for multivariate experiments. It will help identify an imbalance in distribution among multiple groups.

Check SRM after an experiment starts and before interpreting its outcome. It is also useful during monitoring and after changes to traffic allocation, targeting, tracking, or exclusion rules. Investigate a significant SRM before trusting the test results.

Common causes include errors in traffic splitting implementation (bugs in the code), redirection issues, incorrect cookie exclusion, bots or crawlers distorting data, and user exclusion from certain groups.

Yes, a significant SRM (indicated by a low p-value) is a strong sign that something is wrong with how your A/B test was set up or implemented. Ignoring SRM can lead to invalid test results and faulty business decisions.

Fixing SRM typically involves a deep investigation into the A/B test implementation code, checking traffic splitting logic, ensuring user exclusions are properly applied, and analyzing traffic for anomalies (e.g., bot traffic).

Rate this tool
4.5(24 users rated)