G_DURATION Function (Gnumeric)
Use G_DURATION in Gnumeric to solve the number of compounding periods between two values. Interpret fractional periods and its unusual error guards.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =G_DURATION(0.1,1000,1210) has the reference result 2 with the inputs described below. This is an independently checked expectation from Gnumeric’s pinned source, not an observed application result.
Availability and version history
- Introduced: The current G_DURATION name dates to Gnumeric 1.1.6, when the earlier DURATION growth-period function was renamed and DURATION was reassigned to bond duration. The earlier growth function appears among new functions in 0.19. These are different contracts: do not substitute current DURATION for G_DURATION.
- Documented support: Registered in Gnumeric 1.12.62, in the Financial Functions plugin. No retirement is established.
- Last functioning version: Unverified for this guide; source presence does not certify an application execution.
- Scope and dates: English formulas are shown. Official source snapshots were retained from the October 13–14, 2026 audit. This full guide and its reference calculations were checked on October 15, 2026; no newer source retrieval or native run is implied.
What G_DURATION does
G_DURATION computes LN(fv/pv)/LN(1+rate): the number of periods needed to reach a target under constant compounding without intervening cash flows. It is different from bond duration, which is handled by DURATION and MDURATION. Gnumeric’s help identifies this operation with OpenFormula PDURATION, but that is not a claim that PDURATION is a separately accepted English name in every Gnumeric build.
The function-specific help and complete callback provide the product-specific contract.
Syntax and arguments
=G_DURATION(rate,pv,fv)
- rate: Positive rate per modeled compounding period. Zero and negative rates are rejected.
- pv: Nonzero starting value.
- fv: Nonzero target value with the same sign as pv for the real-valued model. All three arguments are required.
The registration was checked alongside the callback; use the exact function name and argument order rather than assuming cross-application equivalence.
Reproducible worksheet
Put rate 10% in B2, starting value 1000 in B3 and target 1210 in B4. In B6 enter =G_DURATION(B2,B3,B4); the reference result is 2 periods. In B7 enter =B3*(1+B2)^B6; the reconstructed target is 1210. If the rate is monthly, the result counts months; if annual, it counts years.
For 8% growth from 1000 to 2000, the algebraic answer is approximately 9.006468342001 periods. The function does not round this to a whole number of credited periods. At nine whole periods the target is still slightly short, while ten whole periods exceeds it.
Formula and boundary checks
All outputs below are source-derived independent reference results. Decimal outputs are rounded to twelve places where needed. Quoted codes remain text; numeric examples remain numbers.
| Formula | Expected reference result |
|---|---|
=G_DURATION(0.1,1000,1210) |
2 |
=G_DURATION(0.08,1000,2000) |
9.006468342001 |
=G_DURATION(0.1,1100,1000) |
-1 |
=G_DURATION(0.1,1000,1000) |
0 |
=G_DURATION(0.1,-1000,-1210) |
2 |
=G_DURATION(0,1000,1210) |
#DIV/0! |
=G_DURATION(-0.1,1000,810) |
#DIV/0! |
=G_DURATION(0.1,0,1210) |
#DIV/0! |
=G_DURATION(0.1,1000,0) |
#DIV/0! |
=G_DURATION(0.1,1000,-1210) |
#VALUE! |
Advanced application and cross-check
When growth is credited only after complete periods, a planning threshold can use =ROUNDUP(G_DURATION(8%,1000,2000),0), giving 10 for this example. Keep the unrounded result as the mathematical estimate and check the rounded horizon with a future-value formula. This distinction matters because the logarithmic solution permits fractional compounding while a product’s payment rules may not.
Equal start and target values give zero at a positive rate. A target smaller than the positive starting amount yields a negative number of periods: =G_DURATION(10%,1100,1000) is -1. That indicates extrapolation backwards under positive growth, not a future waiting time. Validate that the target represents the direction of change you intend.
Errors, boundaries and troubleshooting
The inspected guard returns #DIV/0! for rate zero or negative, and also for either endpoint equal to zero. Opposite-sign endpoints give #VALUE! because their ratio is negative. Both endpoints negative produce a positive ratio and can pass the guard, but interpreting two negative balances as ordinary investment growth needs separate consideration.
Do not apply the function to a series with contributions, withdrawals or varying rates and expect it to account for those flows. It sees only rate and endpoints. A mistakenly entered rate 8 instead of 8% means 800% per period. Also distinguish this underscore-bearing function name from the site’s hyphenated URL: the worksheet formula is G_DURATION, while this guide keeps its existing g-duration route.
The fixtures use explicit strings or valid numeric arguments and dates. Native blank/text coercions, localized formula entry and display formatting remain unverified; keep missing inputs distinct from intentional zero.
Official evidence and verification limits
The calculations are an independent reference model, not execution of the full Gnumeric engine, headless application or graphical editor. No exact installed-release behavior, GUI entry, locale handling, import parity or extreme-value outcome is certified beyond the stated source scope. Reproduce a small fixture in the target build before relying on an operational workbook.