{
  "category": "Financial functions",
  "display_name": "NPV",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.NPV",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20131",
        "?"
      ],
      "larger_numeric": 0,
      "last_bit": 94,
      "matched": 190,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 284,
      "unread": 0,
      "worst_ulp": 2
    },
    "detail": "Everything else matches (284 in the answer bank and 10 workbook cells). Last-bit means a finite number within 16 ULP of Excel's.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "close",
    "state_label": "Close: last-bit deviations remain",
    "summary": "Close: 94 of 294 recorded answers differ in the last bits, worst 2 ULP",
    "workbook_corpus": {
      "cells": 10,
      "matched": 10
    }
  },
  "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#L185-L189",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/financial_time_value_family.rs#L796-L817"
      ],
      "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#L185-L189",
      "state": "close",
      "suite": null,
      "summary": "Close: 94 of 294 recorded answers differ in the last bits, worst 2 ULP"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.NPV.json",
  "name": "NPV",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[XNPV](FUNC.XNPV.md) uses actual dates; [PV](FUNC.PV.md) assumes constant payments; [IRR](FUNC.IRR.md) finds a periodic cash-flow root.\n\n\n",
    "how-to-implement": "\n1. Collect admitted numeric flows in worksheet order. Keep this traversal separate from data admission: an ignored cell does not become a zero-valued period.\n2. With `D` denoting ordinary nearest/even binary64 storage, set `base=D(1+rate)`, `discount=1` and `total=0`. A zero base gives `#DIV/0!` in the current helper.\n3. For each admitted flow, store `discount=D(discount*base)`, `term=D(flow/discount)`, then `total=D(total+term)`.\n4. After the last flow, reject a nonfinite total with `#NUM!`; otherwise publish the numeric result. The current helper also rejects an empty numeric sequence.\n\nIn the example, the first discount factor is 1.25 and the first term 100. The next factor is 1.5625 and the next term is also 100, giving 200. At rate `-2`, the base is minus one and factors alternate signs: the current retained control `NPV(-2,100)` returns `-100` rather than rejecting every rate below minus one.\n\nA power-per-term implementation or reverse Horner fold has a different rounding history. The loop above describes current code, including its stored factors; the mathematical definition alone does not identify Excel’s entire numerical implementation.\n\n\n",
    "quirks": "\nOrder determines timing. Use numeric zero to represent a period with no cash flow; an ignored blank or text entry can remove a position from the numeric sequence. The documented data-admission rules distinguish numerical values from text, logical values and blanks. Rate minus one makes a discount denominator zero.\n\n\n",
    "sources": "\n- [Microsoft: NPV function](https://support.microsoft.com/en-us/excel/functions/npv-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`=NPV(0.25,125,156.25)` returns about `200`: `125/1.25=100` and `156.25/1.25^2=100`. A separate time-zero outflow of 200 gives a net value near zero when added outside NPV.\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| 20131 | Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics | 142 |\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.NPV.json).",
    "what-it-does": "\n`NPV(rate,value1,[value2],...)` discounts equally spaced future cash flows to the point one period before the first amount. The first listed amount is at the end of period one, not at time zero.\n\n\n"
  },
  "signature": {
    "display": "NPV(rate, value1, [value2], ...)",
    "parameters": [
      {
        "description": null,
        "name": "rate",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "value1",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "value2",
        "optional": true,
        "repeats": true
      }
    ],
    "trailing_repeats": true
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 255,
        "min": 2
      },
      "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": "Net present value of periodic cash flows at a discount rate",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the net present value of an investment based on a series of periodic cash flows and a discount rate",
        "microsoft_url": "https://support.microsoft.com/en-us/office/npv-function-8672cb67-2576-4d07-b67b-ac28acf2a568"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "NPV"
        },
        {
          "locale": "bg-BG",
          "name": "NPV"
        },
        {
          "locale": "cs-CZ",
          "name": "NPV"
        },
        {
          "locale": "da-DK",
          "name": "NUTIDSVÆRDI"
        },
        {
          "locale": "de-DE",
          "name": "NBW"
        },
        {
          "locale": "el-GR",
          "name": "NPV"
        },
        {
          "locale": "en-AU",
          "name": "NPV"
        },
        {
          "locale": "en-GB",
          "name": "NPV"
        },
        {
          "locale": "en-US",
          "name": "NPV"
        },
        {
          "locale": "es-ES",
          "name": "VNA"
        },
        {
          "locale": "et-EE",
          "name": "NPV"
        },
        {
          "locale": "fi-FI",
          "name": "NNA"
        },
        {
          "locale": "fr-FR",
          "name": "VAN*"
        },
        {
          "locale": "he-IL",
          "name": "NPV"
        },
        {
          "locale": "hr-HR",
          "name": "NPV (net present value, neto trenutna vrijednost)"
        },
        {
          "locale": "hu-HU",
          "name": "NMÉ"
        },
        {
          "locale": "id-ID",
          "name": "NPV"
        },
        {
          "locale": "it-IT",
          "name": "VAN"
        },
        {
          "locale": "ja-JP",
          "name": "NPV"
        },
        {
          "locale": "ko-KR",
          "name": "NPV"
        },
        {
          "locale": "lt-LT",
          "name": "NPV"
        },
        {
          "locale": "lv-LV",
          "name": "NPV"
        },
        {
          "locale": "nb-NO",
          "name": "NNV"
        },
        {
          "locale": "nl-NL",
          "name": "NHW"
        },
        {
          "locale": "pl-PL",
          "name": "NPV"
        },
        {
          "locale": "pt-BR",
          "name": "NPV"
        },
        {
          "locale": "pt-PT",
          "name": "VAL"
        },
        {
          "locale": "ro-RO",
          "name": "NPV"
        },
        {
          "locale": "ru-RU",
          "name": "ЧПС"
        },
        {
          "locale": "sk-SK",
          "name": "NPV"
        },
        {
          "locale": "sl-SI",
          "name": "NPV"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "NPV"
        },
        {
          "locale": "sv-SE",
          "name": "NETNUVÄRDE"
        },
        {
          "locale": "th-TH",
          "name": "NPV"
        },
        {
          "locale": "tr-TR",
          "name": "NBD işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "NPV"
        },
        {
          "locale": "vi-VN",
          "name": "NPV"
        },
        {
          "locale": "zh-CN",
          "name": "NPV"
        },
        {
          "locale": "zh-HK",
          "name": "NPV"
        },
        {
          "locale": "zh-TW",
          "name": "NPV"
        }
      ],
      "signature": {
        "display": "NPV(rate, value1, [value2], ...)",
        "parameters": [
          {
            "description": null,
            "name": "rate",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "value1",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "value2",
            "optional": true,
            "repeats": true
          }
        ],
        "trailing_repeats": true
      },
      "surface_name": "NPV",
      "version_marker": null,
      "xlcall": {
        "code": "11",
        "symbol": "xlfNpv"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/npv-function-8672cb67-2576-4d07-b67b-ac28acf2a568"
  },
  "try_it": {
    "formula": "=NPV(0.25,125,156.25)"
  },
  "url": "https://handbook.dnacalc.com/functions/NPV.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "142 captured inputs are indexed for this environment. Capture dates: 2026-07-11 to 2026-07-11. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20131",
      "platform": "Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.NPV.json"
      ]
    }
  ]
}