R.PGEOM Function (Gnumeric)
Calculate geometric cumulative and survival probabilities with Gnumeric R.PGEOM. Check failure-count cutoffs, strict upper tails, rounding and log outputs.
Verification status: 21 reference, boundary and advanced-check formulas were recalculated with Gnumeric 1.12.57 ssconvert. Saved identities, the blank input and numerical results were independently checked. Gnumeric 1.12.62 was source-checked only. How formula examples are checked
Quick answer: =R.PGEOM(0,.2) gives 0.2 in Gnumeric 1.12.57.
Availability and version history
- Introduced: First release not established; present in the retained 1.12.57 source.
- Supported in: Gnumeric 1.12.62; no retirement is established.
- Scope: Desktop Gnumeric with its Statistical Functions From R plugin. English comma-separated formulas are shown.
- Checked: October 14, 2026. Tables and the named advanced check use 1.12.57 ssconvert. Current 1.12.62 source was inspected; that release was not executed.
What R.PGEOM returns
R.PGEOM evaluates the cumulative probability of no more than x failures before the first success. For a nonnegative integer cutoff k, the lower tail is 1−(1−p)^(k+1), and the strict upper tail is (1−p)^(k+1). Versioned function help.
Syntax and arguments
=R.PGEOM(cutoff,success_probability[,lower_tail[,log_p]])
- cutoff: required failure-count threshold; ordinary nonnegative fractional cutoffs are floored.
- success_probability: required chance on each independent trial, with 0<p≤1.
- lower_tail: optional TRUE for P(X≤x); FALSE for the strict upper tail P(X>x).
- log_p: optional FALSE. TRUE uses the natural logarithm of the probability.
Brackets mark optional arguments; do not type them. Current worksheet implementation.
Reproducible examples
These self-contained formulas were recalculated natively. Ordinary-domain results were checked against independent mathematics; source guards explain the boundary cases. Results are rounded to twelve decimal places, or thirteen significant digits for small nonzero values. This is presentation precision, not a universal accuracy guarantee.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=R.PGEOM(0,.2) |
0.2 |
=R.PGEOM(3,.2) |
0.5904 |
=R.PGEOM(3.9,.2) |
0.5904 |
=R.PGEOM(3,.2,FALSE()) |
0.4096 |
=R.PGEOM(3,.2,TRUE(),TRUE()) |
-0.526955005696 |
=R.PGEOM(3,.2,FALSE(),TRUE()) |
-0.892574205257 |
=R.PGEOM(0,1) |
1 |
=R.PGEOM(9,.1) |
0.6513215599 |
Practical worksheet
At p=0.2, R.PGEOM(3,0.2)=0.5904 is the chance of success within four attempts. R.PGEOM(3,0.2,FALSE())=0.4096 is the chance that all four attempts fail. Writing the event in attempts first helps avoid shifting the cutoff by one.
Advanced interpretation and checks
For at least three failures, use P(X>2), or R.PGEOM(2,0.2,FALSE()), which equals 0.512. For two through four failures inclusive, subtract R.PGEOM(1,0.2) from R.PGEOM(4,0.2), giving 0.31232. The geometric model is memoryless: after several failures, the chance of surviving another m trials is still (1−p)^m, provided independent identical trials remain a reasonable model.
The saved advanced-check result for =R.PGEOM(3,.2)+R.PGEOM(3,.2,FALSE()) was 1.
Boundaries and troubleshooting
The source floors the cutoff but requires 0<p≤1. A negative cutoff has lower-tail probability zero; requesting its logarithm produces #NUM!. With p=1, every nonnegative cutoff has lower tail 1 and upper tail 0, so the log-upper-tail result is also #NUM!. Do not infer that an error at a log-zero endpoint means the ordinary probability is undefined.
F5 is genuinely empty, rather than a cell containing an empty string.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=R.PGEOM(-1,.2) |
0 |
=R.PGEOM(-1,.2,TRUE(),TRUE()) |
#NUM! |
=R.PGEOM(0,0) |
#NUM! |
=R.PGEOM(0,-.1) |
#NUM! |
=R.PGEOM(0,1.1) |
#NUM! |
=R.PGEOM(0,1,FALSE()) |
0 |
=R.PGEOM(0,1,FALSE(),TRUE()) |
#NUM! |
=R.PGEOM("3",.2) |
0.5904 |
=R.PGEOM("abc",.2) |
#VALUE! |
=R.PGEOM(F5,.2) |
0.2 |
=R.PGEOM(3) |
#N/A |
=R.PGEOM(3,.2,1,0,1) |
#N/A |
Official evidence and checking scope
- Current worksheet callback
- Tested-version worksheet callback
- Current pgeom calculation
- Tested-version pgeom calculation
- Nonfinite worksheet-value handling
- Statistical Functions From R plugin declaration
The relevant complete worksheet callback and main calculation helper are unchanged between the inspected versions. That does not establish later-version numerical execution. Both stale and uncached SUM controls recalculated correctly. Native XML preserves the R.* identities. The secondary ODF export keeps these calls in the ORG.GNUMERIC namespace; it does not establish execution in another product. GUI entry, other locales and other spreadsheet products were not tested.