Learn R Programming

brfinance (version 0.8.0)

calc_npv: Net Present Value (NPV)

Description

Calculates the net present value of a series of cash flows.

Usage

calc_npv(rate, cashflows)

Value

Net present value.

Arguments

rate

Discount rate per period (decimal).

cashflows

Vector of cash flows (first is typically negative investment).

Examples

Run this code
calc_npv(rate = 0.1, cashflows = c(-1000, 300, 400, 500))

Run the code above in your browser using DataLab