# NPV (Net Present Value) Calculator

> NPV (Net Present Value) Calculator is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Computes the net present value of a cashflow stream at a specified per-period discount rate, treating index 0 as t=0 (undiscounted) and discounting subsequent cashflows by (1+rate)^t

## Facts

- Endpoint: POST https://agent402.tools/api/npv
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npv-net-present-value-calculator-7d29939a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7V224niyi-Mm-O8lLXAjz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability npv-net-present-value-calculator-7d29939a -d '<json body>'
```

Example prompt: What's the NPV of a project where I invest $10,000 today, then receive $3,000, $4,000, $4,500, and $2,000 over the next four years, using a 10% discount rate?

## When to prefer this

Use this endpoint when you need a standards-compliant NPV calculation that matches Excel's NPV convention with a t=0 treatment — ideal for capital budgeting, investment appraisal, or any scenario where you need to discount a sequence of 2–1200 cashflows at a constant per-period rate. Prefer it over manual computation or spreadsheet tools when automating financial analysis in an agent pipeline.

## Known failure modes

- cashflows array has fewer than 2 or more than 1200 elements — returns validation error
- discountRate not provided or is non-numeric — returns error
- discountRate of -1 causes division by zero in denominator (1+rate)^t — likely error or undefined result
- malformed JSON body — returns 400 bad request
- payment not included or insufficient — returns 402 Payment Required

## How this service works

Compute the net present value of a stream of cashflows at a given discount rate. Index 0 is treated as t=0 (today, not discounted); indices 1..n are discounted by (1+rate)^t. Matches Excel's NPV but with the conventional t=0 treatment most finance textbooks use (Excel itself starts discounting at t=1 - see notes). Use for capital-budgeting decisions: positive NPV = creates value at the discount rate; negative = destroys value.

## Output

Returns the net present value (a single numeric value in the same currency units as the input cashflows), representing the sum of all discounted future cashflows minus the initial outlay. A positive NPV indicates the investment adds value; negative means it destroys value.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "cashflows": {
   "type": "array",
   "description": "Array of cashflows. Index 0 = t=0 (today, not discounted). Negative = outflow, positive = inflow. 2-1200 elements."
  },
  "discountRate": {
   "type": "number",
   "description": "Per-period discount rate as decimal (0.1 = 10%)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "npv": 388.77,
  "discountRate": 0.1,
  "presentValues": [
   -1000,
   272.73,
   330.58,
   375.66,
   409.81
  ],
  "undiscountedSum": 800
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npv-net-present-value-calculator-7d29939a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
