ForHosting KIT · Developer Utilities

Net present value calculator for cash flows

This net present value calculator converts a sequence of future and current cash flows into one value at period zero.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter a discount rate per period and list the cash flows in chronological order, beginning with period zero. The result shows the total NPV and the present value of every entry, making the calculation easy to inspect, explain, and reproduce. Use it to compare investments, evaluate projects, review proposals, or verify a spreadsheet without hiding the timing assumptions behind a single unexplained number.

Enter cash flows in the correct period order

Start the cash flow list with the amount that occurs at period zero. That amount is usually an initial investment and is therefore often negative, although the calculator accepts either sign. Add later receipts and payments in chronological order, with one value for each equal-length period. A zero is meaningful: include it when a period has no cash movement but later flows still need the correct exponent. Do not remove an empty period merely to shorten the list, because moving a receipt from period three to period two changes its present value. The tool interprets the array position as the period number, so the first value uses period zero, the second uses period one, and so forth. All values must be finite numbers. You can use annual cash flows with an annual discount rate, monthly cash flows with a monthly rate, or another consistent interval. The important rule is that the rate and the spacing of the cash flows describe the same period length.

Understand the discounting calculation

For each period, the calculator divides its cash flow by one plus the discount rate raised to that period number. Period zero is divided by one, so it remains unchanged. Later amounts are discounted more heavily as their period number increases when the rate is positive. The displayed discount factor and present value let you audit each step instead of relying only on the final total. The calculator then adds the present values using compensated summation, which reduces avoidable floating-point loss when large positive and negative values nearly cancel. Output numbers are normalized to stable precision so identical inputs produce consistent JSON. A rate of 0.10 means ten percent per period, not ten; a rate of -0.05 means negative five percent. Rates at or below -1 are rejected because one plus the rate becomes zero or negative, making the standard NPV discounting model undefined or economically unsuitable across successive periods. The final NPV is the sum of all displayed period-zero values.

Interpret NPV and compare alternatives carefully

A positive NPV means the discounted inflows exceed the discounted outflows under the rate you selected. A negative NPV means the modeled returns do not recover the modeled costs at that required rate. Zero indicates break-even on a present-value basis. This is a decision input, not a complete investment verdict: the result depends on the accuracy of the cash-flow forecast, the chosen discount rate, the period convention, taxes, terminal value, and risks that may not appear in the series. When comparing alternatives, use cash flows measured on the same basis and discount rates that reflect comparable assumptions. Consider testing several plausible rates to see whether the ranking changes. Also distinguish this calculation from spreadsheet functions whose NPV formulas sometimes assume every supplied value occurs at the end of a future period; this capability explicitly treats the first supplied cash flow as period zero. Keep the returned period breakdown with your analysis so reviewers can see exactly which amount was discounted, by what factor, and at which point in time.

Evaluate a capital project

Discount the initial cost and forecast operating cash flows to determine whether the project creates value at the required return.

Compare investment alternatives

Calculate each alternative on the same period and rate basis, then compare their present-value totals and timing.

Audit a financial model

Use the per-period discount factors and present values to check a spreadsheet, proposal, or internal calculation.

What does it cost?

An API request costs $0.002. The browser calculation is available without a server-side request.

Is the discount rate a percentage or a decimal?

Enter a decimal rate. For example, use 0.08 for 8% per period and -0.05 for -5% per period.

When does the first cash flow occur?

The first cash flow occurs at period zero and is not discounted. The next value occurs at period one.

Why are rates at or below -100% rejected?

At -100%, the discount base is zero; below -100%, it is negative. The standard NPV formula is not valid for those rates across periods.

Can cash flows be negative or zero?

Yes. Negative values represent outflows, positive values represent inflows, and zeros preserve periods with no cash movement.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/biz/npv-calculate

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/biz/npv-calculate \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"discount_rate":0.1,"cash_flows":[-1000,400,500,600]}'
{
  "discount_rate": 0.1,
  "cash_flows": [
    -1000,
    400,
    500,
    600
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "biz.npv_calculate",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_items10000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →