PROB Function (LibreOffice Calc)
Learn the PROB function in LibreOffice Calc: Returns the discrete probability of an interval.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in LibreOffice Calc. How formula examples are checked
Historical validation scope: Native observations refer to saved LibreOffice Calc 25.2.3.2 Linux evidence dated 13 October 2026 at 11:16 UTC. This later review verified all artifact hashes and 101 ODS/result pairs across the two saved workbooks. It independently checked 31 locale-specific formula-string transformations and 38 probability/auxiliary calculations. Calc was not rerun.
Quick answer
PROB adds the probability weights for the outcomes in a range that lie between an inclusive lower and upper bound. Use it when you already know each possible outcome and its probability; do not use it to calculate a binomial or normal distribution from parameters alone.
=PROB(Data; Probability; Start [; End])
For outcomes 1, 2, 3, 4, 5 with respective probabilities 0.10, 0.20, 0.40, 0.20, 0.10, the formula =PROB(A2:A6;B2:B6;2;4) returns 0.8, or 80%. That output was confirmed in native Calc, not merely calculated by Python. The sum of weights for outcomes 2, 3 and 4 is 0.20 + 0.40 + 0.20 = 0.80. See Calc’s official Statistical Functions, Part Five (PROB section) and OpenFormula 1.4 §6.18.63 (both checked 2026-10-13).
What PROB does—and does not do
Each row of your table connects a possible numeric outcome to its probability mass. For a lower limit Start and an upper limit End, PROB is the sum of the weights for rows where Start <= outcome <= End. Both boundaries are included. If End is omitted, only outcomes equal to Start contribute. The result is a probability fraction; formatting the result cell as Percent does not change the stored value. These rules follow the official Calc Help and OpenFormula semantics, and the main examples were tested in Calc 25.2.3.2.
PROB is different from an average, frequency count or cumulative distribution fitted from raw observations. If you have counts instead of probabilities, convert them to weights first. Unlike BINOM.DIST, PROB does not require a particular parametric distribution: you supply its individual outcome probabilities yourself. It cannot prove that the weights are statistically justified; the quality of the answer depends on the supplied model.
Syntax and arguments
| Argument | Required | Meaning and restrictions |
|---|---|---|
Data |
Yes | An array or cell range containing the discrete numeric outcomes being modelled. Each position matches the corresponding position in Probability. |
Probability |
Yes | An array or range of probability weights; corresponding values must pair with Data. OpenFormula 1.4 requires the weights to sum to 1 and each weight to be greater than 0 and no more than 1. |
Start |
Yes | Numeric inclusive lower bound of the event. |
End |
No | Numeric inclusive upper bound. If omitted, Calc considers only outcomes equal to Start. |
There are no optional probability defaults or automatic normalization of weights. The standard requires the same number of numeric elements in the two arrays; use matching one-column ranges of equal length for an uncomplicated, portable layout. Use semicolons as argument separators in the English Calc formulas on this page; localized UI settings can change the display of separators, names and decimal signs. Do not copy Excel comma-separated syntax into Calc without checking your installation.
OpenFormula name: The function is defined as PROB in OpenDocument 1.4 Part 4, §6.18.63. Neither a Microsoft-specific namespace nor an alternative LibreOffice alias is required by that section. The exact function is present in the LibreOffice Calc 25.2.3.2 native function catalogue, and its calculations below were executed. This does not certify every other spreadsheet program or older Calc build.
Start-to-finish example: a five-outcome probability table
Open a new Calc sheet. Enter these values as numbers, not text. Use one outcome and one weight per row:
| Cell A | Outcome | Cell B | Probability |
|---|---|---|---|
| A1 | Outcome | B1 | Probability |
| A2 | 1 | B2 | 0.10 |
| A3 | 2 | B3 | 0.20 |
| A4 | 3 | B4 | 0.40 |
| A5 | 4 | B5 | 0.20 |
| A6 | 5 | B6 | 0.10 |
The probabilities sum to 1.00. The native test workbook stores the same dataset in the Probability sheet. With this layout, enter:
| Calc formula | Expected value | Explanation |
|---|---|---|
=PROB(A2:A6;B2:B6;2;4) |
0.8 |
Probabilities for outcomes 2, 3 and 4 |
=PROB(A2:A6;B2:B6;3) |
0.4 |
Exact outcome 3; the fourth argument was omitted |
=PROB(A2:A6;B2:B6;1;5) |
1 |
Entire distribution |
=PROB(A2:A6;B2:B6;6;8) |
0 |
No outcomes inside this interval |
=PROB(A2:A6;B2:B6;1) |
0.1 |
Lower extreme, exact value |
=PROB(A2:A6;B2:B6;2;3) |
0.6 |
Outcome 2 plus outcome 3 |
=PROB(A2:A6;B2:B6;3;5) |
0.7 |
Outcomes 3, 4 and 5 |
All seven formulas and expected numerical results are covered by the 34 native PROB assertions or the same independent probability-mass arithmetic. To display 80% instead of 0.8, select the result cell and apply percent formatting; do not multiply the probability by 100 if the cell already has a percent number format.
Add a simple probability-quality check
Before interpreting the result, check that all weights represent a complete distribution:
=SUM(B2:B6)
Expected result: 1. This was also executed and checked natively. For a floating-point tolerant check, use:
=ABS(SUM(B2:B6)-1)<1E-10
This comparison is a proposed guard; only the underlying SUM and PROB calculations were separately asserted in this batch. A weight total of 0.9 or 1.1 is not a valid complete probability distribution under OpenFormula 1.4; do not assume PROB silently scales it to 1.
More worked examples
The same outcome may appear more than once
A discrete table can list the same numeric outcome in multiple rows. PROB adds the probabilities for each matching row. For example, put outcomes 10, 10, 20, 30, 30 in D2:D6 and respective weights 0.10, 0.20, 0.25, 0.30, 0.15 in E2:E6.
=PROB(D2:D6;E2:E6;10)
Returns 0.30 (the two rows for outcome 10). =PROB(D2:D6;E2:E6;10;20) returns 0.55. Both were confirmed by native Calc, independently checked against the row-level weights. Repeated outcomes therefore need not be deduplicated to give the correct total, although consolidating duplicate outcomes may make a table easier to audit.
Outcomes can be negative or non-integers
PROB is not limited to positive whole numbers. Native tests included outcomes -3, -1, 0, 1, 4 with weights 0.05, 0.15, 0.45, 0.25, 0.10. For this table, the inclusive probability from -1 to 1 is 0.85, and the probability of exactly zero is 0.45. Another native dataset used outcomes 0.5, 1.5, 2.5, 3.5, 4.5, 6.5 and verified precise fractional bounds. If you use measurements instead of genuinely discrete values, rounding decisions and finite measurement resolution may affect which values match a bound.
Turn observed counts into weights
Suppose column B instead contains counts: 5, 10, 20, 10, 5 for the five outcomes in column A. In C2 enter:
=B2/SUM($B$2:$B$6)
Fill down through C6. The resulting probabilities should be 0.10, 0.20, 0.40, 0.20, 0.10; =PROB(A2:A6;C2:C6;2;4) consequently equals 0.8 by the same probability model. This count-to-weight example is independently derived from the validated probability table; the combined fill-down workflow was not separately native-tested. Confirm the total count is greater than zero before dividing.
Compare with a transparent weighted-condition calculation
For the five-row primary table:
=SUMPRODUCT((A2:A6>=2)*(A2:A6<=4)*B2:B6)
and
=SUMIFS(B2:B6;A2:A6;">=2";A2:A6;"<=4")
both returned 0.8 in native Calc. This confirms the same sum by two alternative formulas, provided the data are valid numeric probabilities. These alternatives do not by themselves enforce the OpenFormula probability-total or positivity requirements. They are useful audit cross-checks, not interchangeable distribution validation.
A caution: reversed bounds produced a standards discrepancy
Do not use Start > End to request an “empty” interval. OpenFormula 1.4 §6.18.63 explicitly says that when End < Start, PROB returns zero. Yet native LibreOffice Calc 25.2.3.2 on Linux returned 0.8 for:
=PROB(A2:A6;B2:B6;4;2)
using the primary five-row dataset—as if the bounds were interpreted in ascending order. This is a recorded version-specific native result and a genuine difference from the ODF 1.4 stated requirement. No conclusion is made about subsequent Calc builds, different localization, whether the behavior is intentional, or whether a tracked LibreOffice bug exists. The ODS workbook, executable test script and the specific diagnostic record are included for reproducibility.
Safer pattern: Validate Start <= End before calling PROB, for example by placing lower bound in D2, upper bound in E2 and using the following editorial validation pattern:
=IF(D2>E2;NA();PROB(A2:A6;B2:B6;D2;E2))
This entire guard expression is a recommended formula derived from documented IF/NA behavior and the observed PROB issue; it has not been independently executed as one native assertion in this review. A stricter model should also check equal array lengths, that all elements are numeric, positive weights, and SUM(Probability)=1 within a considered floating-point tolerance.
A second caution: a zero weight was accepted in the tested version
OpenFormula 1.4 requires all weights be greater than zero and no more than one. However, native Calc 25.2.3.2 returned 1 for the valid-total but zero-containing weight vector 0.2, 0, 0.8 across three outcomes, rather than rejecting that vector. Treat this as another documented native/standard discrepancy. If zeros represent genuinely impossible outcomes, you can remove those rows and leave only the positive probabilities when preparing a standards-conforming distribution. Validate inputs rather than relying on Calc to enforce every constraint.
Troubleshooting and error handling
| Symptom | Likely cause | Recommended check | Actual 25.2.3.2 evidence |
|---|---|---|---|
#VALUE! |
Probability weights don’t sum to 1 | Run SUM(B2:B6) and inspect each weight |
Bad-total sample (0.9) produced #VALUE!, UNO error code 519 |
#VALUE! |
Negative probability or text supplied as interval bound | Require numeric bounds and nonnegative model weights | Negative-weight and nonnumeric-text Start diagnostics produced #VALUE! |
Err:502 |
Text or genuinely empty outcome within a required data array; missing weight in the sample | Check the two ranges cell by cell | Text-outcome, blank-outcome and missing-weight fixtures produced Err:502 |
#N/A |
Nonmatching range lengths or an upstream NA error | Ensure each data value has exactly one weight, remove upstream errors | Both forms occurred in diagnostics |
Err:511 |
A required argument is missing | Supply Data, Probability and Start | Tested on =PROB() and a missing-Start call |
Result is 0 |
No eligible outcome in a valid interval | Confirm bounds and actual distinct outcomes | Valid no-match interval returned 0 |
| Result is unexpectedly nonzero for reversed bounds | Calc 25.2.3.2 native discrepancy | Validate Start <= End |
4;2 returned 0.8 where ODF 1.4 calls for 0 |
| Zero weight seems accepted | Do not rely on strict argument validation | Remove zero-weight outcomes to conform to ODF | Zero-weight vector returned 1 without error |
A numeric-looking text bound such as "2" was automatically converted in one native diagnostic, while "apple" was rejected. Do not build model correctness around such implicit conversions: enter numeric values explicitly and audit imported spreadsheets. Boolean bounds also produced a numeric result in one diagnostic; that is not a recommendation to use booleans as probability bounds.
What about floating-point rounding?
A set of visually rounded probabilities may sum to 0.9999999999999999 rather than exactly 1 because decimals are represented in finite precision. Use enough precision in source weights, and validate their sum with a tolerance appropriate to your use case. Do not assert a universal acceptance tolerance for PROB: the native run did not systematically test every possible rounding threshold. Prefer storing unrounded original probabilities and applying display rounding only to the visible cells.
Advanced practical use: evaluate risk bands
Suppose each outcome is the net profit from a project, with negative numbers representing losses and weights reflecting a documented discrete scenario model. If profits and weights are in A2:A6 and B2:B6, the exact probability of break-even is:
=PROB(A2:A6;B2:B6;0)
If C2 is your lowest acceptable profit and D2 is your upper scenario limit, use =PROB(A2:A6;B2:B6;C2;D2). When the event is “profit at least zero,” choose a verified upper bound at or above the largest modelled outcome; PROB has no built-in open-ended interval syntax. Use MAX(A2:A6) as an independently documented upper bound after validating the outcome range and ensuring no invalid text is present. This workflow uses model probabilities, not a prediction of a real-world future outcome.
For grouped, multi-category analyses, consider SUMIFS or SUMPRODUCT on the same verified weight table. If you need a probability defined by a statistical distribution rather than manually assigned row masses, research the relevant distribution function instead; see the BINOM.DIST guide for a different model.
Compatibility, locale and verification scope
- Native execution: 34/34 separate PROB numerical cases and 4/4 auxiliary formula cross-checks passed in LibreOffice Calc 25.2.3.2, Linux, through the native UNO calculation engine. Eighteen additional diagnostic observations are recorded separately without being counted as assertions. All expected PROB results were computed independently as sums of known masses; the native workbook was not used as the mathematical oracle.
- Official documentation: The current LibreOffice Help
PROBentry and OpenDocument 1.4 Part 4 §6.18.63 were read 2026-10-13. The LibreOffice online Help was labelled “LibreOffice 26.8 Help” at access time; it is not the installed test build. The function exists in the tested 25.2 native catalogue. - Standards support: ODF’s intrinsic function name is
PROB. The 1.4 OpenFormula definition supplies argument constraints and reversed-bound semantics, two of which differed from the tested 25.2 behavior as detailed above. ODF conformance of other functions, releases or applications was not established here. - Import/export: The test workbook was saved as
.ods. No XLSX round-trip, Google Sheets, Excel, Apache OpenOffice, Windows or macOS compatibility claim is made without independent execution in those environments. Any imported probability table should be checked for number-vs-text coercion and complete input weights.
Related Calc functions
- SUMPRODUCT — sum probability weights after multiplying Boolean inclusion tests.
- SUMIFS and SUMIF — conditional sums of weights or counts.
- COUNTIF and COUNT — explore observed frequencies and validate numeric entries.
- BINOM.DIST — binomial distribution with trial/probability parameters rather than supplied outcome weights.
- IF and NA — reject reversed or invalid model intervals explicitly.
Sources and verification notes (checked 13 October 2026)
- LibreOffice Help, Statistical Functions Part Five, “PROB”: argument syntax, inclusive interval, optional End semantics and an example. https://help.libreoffice.org/latest/en-US/text/scalc/01/04060185.html (accessed 2026-10-13).
- OASIS OpenDocument 1.4, Part 4: OpenFormula, §6.18.63
PROB, approved 6 October 2025: function’s normative syntax, full probability sum, strict-positive weight constraint, equal count constraint, inclusive bounds and explicit reversed-bound result. https://docs.oasis-open.org/office/OpenDocument/v1.4/os/part4-formula/OpenDocument-v1.4-os-part4-formula.html (accessed 2026-10-13). - Local native calculation evidence,
native_prob_results.jsonandLibreOffice_PROB_Native_Validation.ods, generated 2026-10-13. The Python/UNO scriptnative_prob_validation.pydocuments actual formulas, dataset cells, result values and errors, with 34 independent-probability-mass assertions and 4 auxiliary cross-checks. The observed reversed-bound and zero-weight behaviors are not assumptions imported from other spreadsheet products.