{
  "category": "Financial functions",
  "display_name": "PDURATION",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.PDURATION",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 1205,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 1205,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 1,205 in the answer bank and 5 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 1,210 recorded answers",
    "workbook_corpus": {
      "cells": 5,
      "matched": 5
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/financial.rs#L210-L212",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/financial_time_value_family.rs#L1108-L1128"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/financial::tv_out",
        "ported/financial_time_value_family::validate_finite"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/financial.rs#L210-L212",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 1,210 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.PDURATION.json",
  "name": "PDURATION",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[NPER](FUNC.NPER.md) includes periodic payments; [RRI](FUNC.RRI.md) solves a growth rate from a period count; [FV](FUNC.FV.md) solves the resulting balance.\n\n\n",
    "how-to-implement": "\nLet `D` denote ordinary nearest/even binary64 storage. The current graph uses three separate [public worksheet LN](FUNC.LN.md#how-to-implement) results:\n\n1. Validate finite, strictly positive rate, present value and future value.\n2. Obtain `Lf=LN(fv)` and `Lp=LN(pv)`, each stored to binary64.\n3. Form `base=D(1+rate)` and obtain the stored `Lb=LN(base)`.\n4. Store `difference=D(Lf-Lp)`, then `duration=D(difference/Lb)`. Return `#NUM!` if the result is nonfinite.\n\nFor rate `0.25`, pv `64` and fv `100`, the current x87-LN reconstruction gives these intermediate numbers:\n\n| Stage | Stored binary64 value |\n|---|---:|\n| LN(100) | 4.605170185988092 |\n| LN(64) | 4.1588830833596715 |\n| Difference | 0.4462871026284203 |\n| LN(1.25) | 0.22314355131420976 |\n| Division | 2.0000000000000036 |\n\nThe mathematical duration is exactly two; the table is a worked reconstruction of the cited operation tree, rather than an additional Excel measurement. Its split logarithms can lose low bits in the subtraction. Do not first compute `fv/pv` and take one logarithm: the source’s retained 80-input control distinguishes that ratio-log candidate from the split graph. The LN instruction approximation and transfer to other CPUs remain separately scoped.\n\n\n",
    "quirks": "\nThe documented arguments must all be positive; invalid values give `#NUM!`, and invalid data types give `#VALUE!`. A target below the starting amount is still permitted and gives a negative duration at a positive rate.\n\nThe current helper has no equal-value shortcut before its logarithm calculation. Equal positive amounts normally give zero, but a rate so small that stored `1+rate` equals one makes the denominator zero; the resulting nonfinite calculation gives `#NUM!`. Replacing the denominator by a stable `log1p(rate)` would change this boundary behaviour.\n\n\n",
    "sources": "\n- [Microsoft: PDURATION function](https://support.microsoft.com/en-us/excel/functions/pduration-function), opened 6 November 2026; syntax, documented argument rules and errors.\n- [DnaCalc implementation](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/ported/financial_time_value_family.rs); implementation steps and the limits identified in the text.\n\n",
    "try-it": "\n`=PDURATION(0.25,64,100)` is about `2`: `64*1.25^2=100`. The result can be fractional; a target below the starting value gives a negative mathematical duration at a positive rate.\n\n\n",
    "version-differences": "The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.\n\n| Excel 16.0 build | Platform and CPU | Captured inputs |\n|---|---|---:|\n| 20430 | Windows, 64-bit, CPU not recorded | 1,205 |\n\nThe record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.PDURATION.json).",
    "what-it-does": "\n`PDURATION(rate,pv,fv)` returns the number of periods for a positive amount to grow to a positive target at a positive constant rate, without intervening payments.\n\n\n"
  },
  "signature": {
    "display": "PDURATION(rate, pv, fv)",
    "parameters": [
      {
        "description": null,
        "name": "rate",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "pv",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "fv",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 3,
        "min": 3
      },
      "category": "Financial functions",
      "classification": {
        "arg_preparation_profile": "RefsVisibleInAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Number of periods an investment needs to grow to a target value at a fixed rate",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the number of periods required by an investment to reach a specified value",
        "microsoft_url": "https://support.microsoft.com/en-us/office/pduration-function-44f33460-5be5-4c90-b857-22308892adaf"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "PDURATION"
        },
        {
          "locale": "bg-BG",
          "name": "PDURATION"
        },
        {
          "locale": "cs-CZ",
          "name": "PDURATION"
        },
        {
          "locale": "da-DK",
          "name": "PVARIGHED"
        },
        {
          "locale": "de-DE",
          "name": "PDURATION"
        },
        {
          "locale": "el-GR",
          "name": "PDURATION"
        },
        {
          "locale": "en-AU",
          "name": "PDURATION"
        },
        {
          "locale": "en-GB",
          "name": "PDURATION"
        },
        {
          "locale": "en-US",
          "name": "PDURATION"
        },
        {
          "locale": "es-ES",
          "name": "P.DURACION"
        },
        {
          "locale": "et-EE",
          "name": "PDURATION"
        },
        {
          "locale": "fi-FI",
          "name": "KESTO.JAKSO"
        },
        {
          "locale": "fr-FR",
          "name": "PDUREE*"
        },
        {
          "locale": "he-IL",
          "name": "PDURATION"
        },
        {
          "locale": "hr-HR",
          "name": "PDURATION"
        },
        {
          "locale": "hu-HU",
          "name": "KAMATÉRZ.PER"
        },
        {
          "locale": "id-ID",
          "name": "PDURATION"
        },
        {
          "locale": "it-IT",
          "name": "PDURATION"
        },
        {
          "locale": "ja-JP",
          "name": "PDURATION"
        },
        {
          "locale": "ko-KR",
          "name": "PDURATION"
        },
        {
          "locale": "lt-LT",
          "name": "PDURATION"
        },
        {
          "locale": "lv-LV",
          "name": "PDURATION"
        },
        {
          "locale": "nb-NO",
          "name": "PVARIGHET"
        },
        {
          "locale": "nl-NL",
          "name": "PDUUR"
        },
        {
          "locale": "pl-PL",
          "name": "O.CZAS.TRWANIA"
        },
        {
          "locale": "pt-BR",
          "name": "PDURATION"
        },
        {
          "locale": "pt-PT",
          "name": "PDURAÇÃO"
        },
        {
          "locale": "ro-RO",
          "name": "PDURATION"
        },
        {
          "locale": "ru-RU",
          "name": "ПДЛИТ"
        },
        {
          "locale": "sk-SK",
          "name": "PDURATION"
        },
        {
          "locale": "sl-SI",
          "name": "PDURATION"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "PDURATION"
        },
        {
          "locale": "sv-SE",
          "name": "PLÖPTID"
        },
        {
          "locale": "th-TH",
          "name": "PDURATION"
        },
        {
          "locale": "tr-TR",
          "name": "PSÜRE"
        },
        {
          "locale": "uk-UA",
          "name": "PDURATION"
        },
        {
          "locale": "vi-VN",
          "name": "PDURATION"
        },
        {
          "locale": "zh-CN",
          "name": "PDURATION"
        },
        {
          "locale": "zh-HK",
          "name": "PDURATION"
        },
        {
          "locale": "zh-TW",
          "name": "PDURATION"
        }
      ],
      "signature": {
        "display": "PDURATION(rate, pv, fv)",
        "parameters": [
          {
            "description": null,
            "name": "rate",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "pv",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "fv",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "PDURATION",
      "version_marker": null,
      "xlcall": {
        "code": "570",
        "symbol": "xlfPduration"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/pduration-function-44f33460-5be5-4c90-b857-22308892adaf"
  },
  "try_it": {
    "formula": "=PDURATION(0.25,64,100)"
  },
  "url": "https://handbook.dnacalc.com/functions/PDURATION.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "1,205 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20430",
      "platform": "Windows, 64-bit, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.PDURATION.json"
      ]
    }
  ]
}