Benjamini-Hochberg q Value Calculator
Estimate an adjusted q value from a p-value using the Benjamini-Hochberg (BH) false discovery rate method:
q = (p × m) / i, capped at 1.0
Note: This computes the BH estimate for a single ranked p-value. Full dataset adjustment usually applies a cumulative monotonic correction across all ranks.
What is a q value?
A q value is a p-value adjusted for multiple comparisons. When you run many hypothesis tests at once, some results appear significant purely by chance. q values help control this problem by managing the expected proportion of false positives among all findings you call significant.
In practical terms, if you set a false discovery rate threshold of 0.05, you are accepting that about 5% of declared discoveries may be false positives on average.
q value vs p-value
p-value
A p-value measures how surprising your data would be if the null hypothesis were true. It works well for a single test, but can be misleading across hundreds or thousands of tests.
q value
A q value adjusts for the number of tests and the rank of each p-value. It gives a better signal for large-scale analyses such as genomics, proteomics, A/B testing across many variants, or feature screening in machine learning.
Formula used in this calculator
This page uses the Benjamini-Hochberg estimate for one ranked result:
- q = (p × m) / i
- p = original p-value
- m = total number of tests
- i = rank of the p-value after sorting ascending
- Final q values are capped at 1.0
This is the standard core step in BH adjustment. In full workflows, q values are often made monotonic by processing from the largest rank to the smallest and applying cumulative minima.
How to use this q value calculator
- Enter your p-value.
- Enter its rank i among all sorted p-values.
- Enter the total number of tests m.
- Optionally set your FDR threshold (for example, 0.05).
- Click Calculate q Value.
Interpreting your result
The tool reports both the raw BH value and the capped q value. If the q value is less than or equal to your chosen FDR threshold, the result is considered significant under that false discovery tolerance.
- q ≤ 0.05: often considered significant at 5% FDR.
- q ≤ 0.10: sometimes used in exploratory research.
- q > threshold: not significant under your current FDR target.
Worked example
Suppose your p-value is 0.012, it ranks 3rd among 120 tests, and your FDR threshold is 0.05.
q = (0.012 × 120) / 3 = 0.48. Since 0.48 is much larger than 0.05, this result is not significant under 5% FDR.
This is a common surprise: a small p-value can lose significance after multiple-testing correction.
Common mistakes to avoid
- Using unsorted p-values but providing a rank from unsorted order.
- Forgetting that rank starts at 1 (smallest p-value).
- Using the wrong total test count.
- Treating one adjusted value as a full dataset correction without monotonic adjustment.
When q values are especially useful
- High-throughput experiments (omics, screening, survey batteries)
- Large product experiments with many simultaneous variants
- Feature-level tests in predictive modeling pipelines
- Any workflow where many hypotheses are tested together
Final takeaway
A q value gives you a realistic way to interpret significance when many tests are involved. Use this calculator for quick BH estimates, and for publication-grade pipelines, compute adjusted q values across the complete set of tests with monotonic correction.