Bonferroni Correction Calculator Formula and Example
- Bonferroni-adjusted p-value
- Result
- Significance level (alpha)
- 0.05
- You entered
- Number of tests
- 5
- You entered
A Bonferroni correction calculator adjusts a significance threshold for the number of hypothesis tests you conduct. Enter the unadjusted significance level (alpha) and the number of tests; the calculator returns the Bonferroni-adjusted alpha and, for a p-value, its adjusted value.
Formula
The Bonferroni-adjusted significance threshold is alphaadj = alpha / m. The Bonferroni-adjusted p-value is padj = min(1, p × m).
- alpha is the chosen family-wise significance level before correction, often 0.05. It is a probability and has no unit.
- m is the number of tests in the family being corrected. It is a positive whole-number count.
- p is the raw p-value for one test, between 0 and 1.
- alphaadj is the stricter per-test threshold. Compare each raw p-value with this value.
- padj is the adjusted p-value, capped at 1 because a p-value cannot exceed 1.
These quantities are dimensionless: there are no measurement units to convert. The two forms are equivalent for decisions: a raw p-value is significant under the correction if it is no greater than alpha/m, or if its adjusted p-value is no greater than alpha.
Worked Example
Using the calculator defaults, alpha = 0.05, m = 5, and raw p = 0.02:
- Divide the significance level by the number of tests: 0.05 / 5 = 0.01. This is the Bonferroni-adjusted alpha.
- Multiply the raw p-value by the test count: 0.02 × 5 = 0.10.
- Cap the adjusted p-value at 1 if needed. Here, 0.10 is below 1, so the adjusted p-value is 0.10.
Since 0.02 is greater than the adjusted threshold of 0.01, this result does not meet the Bonferroni-corrected significance criterion at alpha = 0.05. The same conclusion follows because the adjusted p-value, 0.10, exceeds 0.05.
How the Bonferroni Correction Works
When several hypotheses are tested, the chance of getting at least one false positive across the group can exceed the chosen significance level for a single test. The Bonferroni method controls the family-wise error rate (FWER), the probability of making one or more Type I errors within a defined family of tests, by allocating a smaller error allowance to each test.
For example, if five tests each use an unadjusted threshold of 0.05, the overall chance of at least one false positive can be greater than 5% (assuming the tests are independent, it is 1 − 0.955, or about 22.6%). Setting each test’s threshold to 0.01 using Bonferroni keeps the FWER at no more than 0.05, regardless of whether the tests are independent. The method is valid under dependence too, although it can be conservative.
Choosing the Number of Tests
The calculation is simple; defining the family of tests is often the more consequential choice. Count the hypotheses that belong to the same inferential question or analysis plan—not merely the tests that happened to produce interesting results.
- Include the tests for which you intend to make a shared claim, such as comparisons across several groups or outcomes.
- Decide the family based on the study design and research question, ideally before looking at results.
- Do not reduce m by excluding nonsignificant tests after seeing their p-values. That changes the correction in a results-dependent way.
- Do not automatically combine every test in an entire project into one family. Separate families may be reasonable when they address genuinely distinct questions, but the rationale should be clear.
With m = 1, the adjustment changes nothing. If you enter a non-integer count, the calculator’s arithmetic still works, but the input does not represent a literal number of tests; use the appropriate whole-number family size.
When to Use It and How to Interpret It
Use the correction when the goal is to control the probability of one or more false positives across a set of tests. It is commonly considered for multiple comparisons, exploratory analyses, and testing several outcomes or hypotheses. Report the family definition, number of tests, correction method, and whether you present adjusted p-values or an adjusted threshold.
The correction changes the decision threshold or the reported p-value; it does not change the underlying data, test statistic, or raw p-value. A result that fails the corrected threshold is not proof that the null hypothesis is true. Likewise, a result that passes it does not measure the size or practical importance of an effect. Interpret it alongside the study design, effect estimate, uncertainty, and other relevant evidence.
Common Mistakes and Limitations
- Mixing the two approaches: If you compare raw p-values with alpha/m, do not also compare those same raw values with alpha. Alternatively, compare adjusted p-values with the original alpha.
- Adjusting twice: Do not multiply a p-value by m and then compare it with alpha/m. Those are two different ways to express the same correction, not steps to apply together.
- Rounding too early: Keep full precision during calculations and round only for display. A p-value near the cutoff can appear to change category if rounded prematurely.
- Confusing alpha with a p-value: Alpha is a chosen decision threshold; a p-value is calculated from the observed data under a statistical model. They are not interchangeable.
- Assuming it is always best: Bonferroni is straightforward and broadly valid, but can have low power when many tests are included, making genuine effects harder to detect.
Bonferroni does not correct bias, poor measurement, inappropriate models, or every problem caused by selective reporting. It addresses a specific issue: false-positive risk across a declared family of hypothesis tests.
Alternatives to Bonferroni
Other procedures may better match the goal and structure of an analysis. Holm’s step-down procedure controls the family-wise error rate and is generally at least as powerful as the simple Bonferroni procedure. The Benjamini–Hochberg procedure instead controls the false discovery rate—the expected proportion of false positives among rejected hypotheses—rather than the chance of any false positive in the family. These methods answer different error-control goals, so choosing one is a statistical design decision, not merely a way to obtain more significant results.
Frequently Asked Questions
What is the Bonferroni correction formula?
Divide the chosen family-wise alpha by the number of tests: alpha-adjusted = alpha/m. Equivalently, multiply each raw p-value by m and cap the result at 1.
How do I calculate a Bonferroni-adjusted p-value?
Multiply the raw p-value by the number of tests. For a raw p-value of 0.02 across five tests, the adjusted p-value is 0.10.
Do I compare the adjusted p-value with 0.05?
Compare it with the original alpha, such as 0.05. Alternatively, compare the raw p-value with alpha divided by the number of tests. Do not apply both comparisons to the same raw p-value.
What should I count as the number of tests?
Count the hypotheses in the family for which you want to control the overall false-positive risk. Define that family based on the research question and analysis plan, not on which results are significant.
Is the Bonferroni correction too conservative?
It can be, particularly when many tests are included, because its threshold becomes smaller as m grows. A procedure such as Holm’s may offer more power while still controlling the family-wise error rate.
Related
Formula used
in alpha | Significance level (alpha) | - | 0.05 | 0 in m | Number of tests | - | 5 | 1 in p | Raw p-value | - | 0.02 | 0 out adjusted_alpha | Bonferroni-adjusted alpha | - | alpha / m | 4 out adjusted_p | Bonferroni-adjusted p-value | - | min(1, p * m) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.