This proportion difference calculator shows the gap between two proportions in every common form. It gives the change in percentage points and in percent, the risk ratio, the odds ratio and the number needed to treat. From counts it adds a confidence interval to each. To test whether the difference is statistically significant, use our two proportion z test calculator.
How to Use the Proportion Difference Calculator
- From counts: enter the number of successes and the sample size for each group, and pick the confidence level.
- Two percents: enter the new and old rates to see percentage points next to percent change.
- Read the list under the result: each line is the same gap in a different unit.
Percentage Points vs Percent
When a rate rises from 30% to 40%, the absolute difference is 10 percentage points. The relative difference is 10 ÷ 30 = 33.3%. Both are correct; they answer different questions. Headlines often mix them up, so a “10% rise” may mean either.
The gap matters even more for small rates. A risk going from 2% to 3% is only 1 percentage point, yet it is a 50% relative increase. Reporting both stops the smaller or the larger number from misleading readers.
| From | To | Absolute | Relative |
|---|---|---|---|
| 30% | 40% | +10 points | +33.33% |
| 2% | 3% | +1 point | +50% |
| 50% | 45% | −5 points | −10% |
Proportion Difference Formulas
Formula
Risk difference = p₁ − p₂ In percentage points; also called the absolute difference.
Formula
Relative difference = (p₁ − p₂) ÷ p₂ Group 2 is the reference.
Formula
Risk ratio = p₁ ÷ p₂ Odds ratio = [p₁/(1 − p₁)] ÷ [p₂/(1 − p₂)] Formula
Number needed to treat = 1 ÷ |p₁ − p₂| The interval for the risk difference uses Newcombe’s method; the risk ratio uses the Katz log interval and the odds ratio the Woolf logit interval. All three match Python statsmodels. They rest on the normal approximation to the binomial distribution.
Worked Example
In a clinical trial, 30 of 100 patients improve on treatment and 20 of 100 on placebo.
- Risk difference: +10 points, 95% confidence interval −2.02% to 21.67%.
- Relative difference: +50%.
- Risk ratio: 1.5, 95% CI 0.916 to 2.456.
- Odds ratio: 1.714, 95% CI 0.895 to 3.285.
- Number needed to treat: 10, so about ten patients must be treated for one extra improvement.
Every interval includes no effect (0 for the difference, 1 for the ratios), so this sample alone cannot rule out chance.
Which Measure Should I Report?
A rule of thumb: report the points first, with their interval, because they show the real-world size of the effect. Add the risk ratio when readers think in “times as likely”. Odds ratios suit case-control studies and logistic regression. Number needed to treat suits medicine and policy.
All of these are effect size measures. A p-value or a chi-squared statistic only says whether the gap could be chance; it does not say how big it is.
Percent Difference Is Something Else
A percent difference calculator divides |a − b| by the average of a and b, which treats both values the same. That is useful for comparing two measurements, but for two proportions with a clear reference group the relative difference is the usual measure. A percentage difference calculator of that kind gives one number. A percent change calculator gives another for the same pair.
Proportion Difference Calculator Uses
Analysts use it as a compare two proportions calculator before writing a report. It is a two proportions calculator for A/B tests, surveys and trials. Some call it a proportional difference calculator. Others use it as a relative difference calculator. A few say ratio difference calculator.
To calculate proportion difference values by hand, subtract the rates. The proportion difference formula is p₁ − p₂. For the relative form, the proportion difference equation divides by p₂. Here is a proportion difference example: 40% against 30% is 10 points. Each proportion difference calculation shows its steps.
This is a proportion difference tool, not a test. For a proportion difference test, the z test page gives z and p. For proportion difference significance with an interval, the CI page adds a range. Proportion difference statistics like the risk ratio appear in the list here. A sample proportion difference is an estimate. The target is the population proportion difference.
The input fields take counts or percents. The output display shows the gap in points and percent. Each formula is listed above, and the algorithm uses statsmodels-checked intervals. The user interface keeps both tabs on one card, and the reset button restores the trial example.
Before and After the Test
Plan first: sample size proportions planning tells you how many people you need to detect a gap. Our sample size calculator handles that step.
After the data arrive, a two proportion z-test decides whether the gap could be chance. Any proportion test of this kind answers yes or no. That is hypothesis testing proportions, and it gives a p-value. The standard error difference, √(p̂₁q̂₁/n₁ + p̂₂q̂₂/n₂), sets the width of any interval. Half that width is the margin of error proportions reports quote.
Confidence interval proportions methods then show the plausible range. A population proportion comparison is complete only with both the size of the gap and its uncertainty, which is what this page adds.
Related Tests and Terms
To compare two proportions for significance, use the Two-Proportion Z-Test. It relies on a pooled proportion and the normal distribution. For small counts, Fisher's exact test is safer. A continuity correction adjusts z for discrete counts. Paired data need the McNemar test. Independent samples are assumed throughout.
The Confidence Interval for Difference in Proportions lives on our two proportion confidence interval calculator. There, Two proportions confidence interval methods are compared. A single Proportions confidence interval is on the one-group page. Each confidence interval shows the range of plausible values.
Many searches lead here. Some type difference in proportions. Others type difference between proportions. A third group asks for the two proportion difference. Some even search test difference proportions. The relative difference is one of the two measures you will meet most. The other is the absolute difference. Percentage change and proportion change mean the relative form. A null hypothesis of no difference and a z-score belong to the test. The proportion ratio is the risk ratio.
Proportion Difference Calculator FAQ
How do you calculate the difference between two proportions?
Subtract them: p₁ − p₂. 40% − 30% = 10 percentage points.
Is a 10 percentage-point increase the same as a 10% increase?
No: 30% to 40% is 10 points but a 33.3% relative increase.
What is the difference between risk difference and risk ratio?
The risk difference subtracts the rates; the risk ratio divides them. 30% vs 20% gives +10 points and 1.5.
What is the number needed to treat?
1 ÷ the absolute difference: with a 10-point difference, about 10 people per extra success.
How do I know if the difference is significant?
Check whether the interval for the difference includes 0, or run the two proportion z test for a p-value.
What if one group has zero successes?
The difference still works, but the ratios and their intervals are undefined; the calculator leaves them out.
References
- Altman, D. G., Machin, D., Bryant, T. N. & Gardner, M. J. (2000) – Statistics with Confidence, 2nd ed., BMJ Books
- Newcombe, R. G. (1998) – Interval estimation for the difference between independent proportions, Statistics in Medicine 17(8)
- Katz, D. et al. (1978) – Obtaining confidence intervals for the risk ratio in cohort studies, Biometrics 34(3)
Related Calculators
- Two Proportion Confidence Interval Calculator: interval for the difference of two proportions
- Two Proportion Z Test Calculator: compare two proportions with a z test