BINOM.INV in ONLYOFFICE: Find a Cumulative Count Threshold
Use BINOM.INV and CRITBINOM to find the first binomial count meeting a target probability, with exact threshold and boundary checks.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =BINOM.INV(4,0.5,0.5) has the independent target 2. One success gives cumulative probability 0.3125, while two gives 0.6875; two is the first count reaching 0.5. CRITBINOM is the related legacy spelling covered here.
Syntax: an inverse that returns a count
=BINOM.INV(trials, probability_s, alpha)
=CRITBINOM(trials, probability_s, alpha)
Trials is the fixed number of independent trials, probability_s is the success chance on each trial, and alpha is the cumulative target. The result is the smallest integer k for which P(X≤k)≥alpha. It is not the probability of k successes and is not a continuous interpolated count.
Use a whole-number trial count, an interior per-trial probability and 0<alpha<1 for the main examples. As with BINOM.DIST, each trial must have two outcomes and the same success probability. Correlated trials or a changing chance require a different model, regardless of whether the formula calculates successfully.
The BINOM.INV reference and CRITBINOM reference document the names with different boundary wording. The tagged source makes BINOM.INV inherit CRITBINOM’s calculation. The boundary reconciliation below follows that source and is not a native result report.
A small distribution you can check completely
On BinomialThreshold, enter 4 in B2,0.5 in B3 and 0.5 in B4. Label them Trials, Success probability and Cumulative target. Put =BINOM.INV(B2,B3,B4) in E2 and =CRITBINOM(B2,B3,B4) in E3. Both targets are 2.
To audit the answer, enter 0..4 in A8:A12. In B8 enter =BINOM.DIST(A8,$B$2,$B$3,TRUE) and fill down. The independent targets are:
| k | Cumulative probability |
|---|---|
| 0 | 0.0625 |
| 1 | 0.3125 |
| 2 | 0.6875 |
| 3 | 0.9375 |
| 4 | 1 |
Look for the first cumulative value at least as large as alpha. This is an exact enumeration of 16 equally likely trial sequences, so no inverse solver is needed to establish the target.
Three thresholds and an equality boundary
Keep n=4 and p=0.5:
| Formula | Target count | Check |
|---|---|---|
=BINOM.INV(4,0.5,0.1) |
1 | 0.0625<0.1≤0.3125 |
=BINOM.INV(4,0.5,0.5) |
2 | 0.3125<0.5≤0.6875 |
=BINOM.INV(4,0.5,0.9) |
3 | 0.6875<0.9≤0.9375 |
=BINOM.INV(4,0.5,0.6875) |
2 | Equality already meets the target |
=BINOM.INV(4,0.5,0.6876) |
3 | Just above the previous step |
The equality case is important. Requiring the cumulative probability to be strictly greater than alpha would incorrectly advance the count when alpha lies exactly on a cumulative step. The output changes in jumps, so a tiny alpha change need not cause a tiny count change.
Advanced: verify both sides of an inverse answer
After computing k in E2, enter =BINOM.DIST(E2,B2,B3,TRUE) in E5. It should be at least B4. If k>0, enter =BINOM.DIST(E2-1,B2,B3,TRUE) in E6; that cumulative value should be below B4. For k=0, there is no valid previous nonnegative count, so do not evaluate the negative-count formula.
This pair of checks is more informative than comparing the inverse answer to the mean n×p. A cumulative threshold need not equal the mean. For n=5,p=0.2,alpha=0.8, the independently enumerated CDF is 0.32768 at 0,0.73728 at 1, and 0.94208 at 2, so the threshold is 2 even though the mean is 1.
In a planning worksheet, label the result as a modeled count quantile. It does not guarantee that a future batch will stay below that count, and it does not establish a confidence interval for an unknown probability.
Boundary disagreements and errors
The modern help describes n>0 and 0<p<1. Legacy help permits n=0 and p endpoints, and also describes alpha endpoints as included. The inspected common calculation actually rejects n<0, p<0 or p>1, and alpha≤0 or alpha≥1.
Consequently the source predicts these bounded cases:
| Formula | Source-predicted result |
|---|---|
=BINOM.INV(0,0.5,0.5) |
0 |
=BINOM.INV(4,0,0.5) |
0 |
=BINOM.INV(4,1,0.5) |
4 |
=BINOM.INV(4,0.5,0) |
#NUM! |
=CRITBINOM(4,0.5,1) |
#NUM! |
Use interior alpha values rather than assuming that all mathematically meaningful endpoints are implemented. Fractional trials are also outside this guide’s recommended contract: the inspected loop does not explicitly truncate n before use. Large-n underflow is a separate numerical issue; the source contains an alternate-tail branch and can return a value-type error if both starting powers underflow. Small examples do not establish robust extreme-tail accuracy.
Related functions and compatibility
BINOM.DIST goes from count to probability. BINOM.DIST.RANGE sums an inclusive band of counts. These are related operations, not interchangeable argument lists. Preserve both BINOM.INV and CRITBINOM spellings when documenting imported workbooks; no retirement of CRITBINOM is established by the checked sources.
References checked October 18, 2026
- Official BINOM.INV and CRITBINOM: purpose, syntax and differing endpoint descriptions.
- Tagged SDKJS calculation and inheritance: common implementation, comparisons and numerical branches.
Availability, version scope and verification
This function is currently documented in ONLYOFFICE’s rolling Spreadsheet Editor help. Its original introduction version/date and final supported-version endpoint are not established here. A legacy spelling does not by itself mean that a function is deprecated or retired.
The implementation evidence is official SDKJS tag v10.0.0.169, pinned to commit 3679e0375a758d7dc59d31337a45461be3525ed8. That identifies the inspected source revision, not proof of identical behavior in every Docs server, Desktop Editors build, mobile client or exported workbook. Sources were checked on October 18, 2026.
These examples were not tested in the application. Numerical answers in this guide are independently calculated mathematical targets; implementation-specific cases are explicitly source-predicted. No ONLYOFFICE calculation engine was executed for these examples. No native screenshot, recalculated workbook or successful GUI workflow is claimed. Formulas use English names and comma separators; a localized installation may require different separators or translated names.