By: G.A.JAGUAR
A simple calculator for the future value of an investment.
# build docker container and install dependencies.
sh install.sh
# create a docker image
docker-compose build
# install dependencies
docker-compose run --rm server pnpm i
# build for production
docker-compose run --rm server yarn build
# install dependencies
# pnpm (recommended to save disk space)
pnpm i
# or with yarn
yarn
# or native
npm install
# build for production
pnpm build
Add to your project with next command:
# npm
npm install @gajaguar/future-value
# yarn
yarn add @gajaguar/future-value
# or pnpm
pnpn add @gajaguar/future-value
This package contain a function for each element that intervene in the calculation of the future value of an investment.
Which are futureValue
, presentValue
, interest
(as effective interest),
nominalInterest
and periods
.
Only import the desired function from package:
// require format
const { futureValue } = require('@gajaguar/future-value')
// ES5 import
import { futureValue } from '@gajaguar/future-value'
Where:
Vf: Future value
Vp: Present value
i: Interest rate
n: Number of periods
Name | Type | Default | Description |
---|---|---|---|
presentValue |
number | string | undefined |
Current or initial value of the investment. |
interest |
number | string | undefined |
Interest rate of the investment. |
periods |
number | string | 12 |
Number of the investment periods (usually moths). |
Where:
Vp: Present value
Vf: Future value
i: Interest rate
n: Number of periods
Name | Type | Default | Description |
---|---|---|---|
futureValue |
number | string | undefined |
Investment value after specified periods. |
interest |
number | string | undefined |
Interest rate of the investment. |
periods |
number | string | 12 |
Number of the investment periods (usually moths). |
Where:
i: Interest rate
Vp: Present value
Vf: Future value
n: Number of periods
Name | Type | Default | Description |
---|---|---|---|
presentValue |
number | string | undefined |
Current or initial value of the investment. |
futureValue |
number | string | undefined |
Investment value after specified periods. |
periods |
number | string | 12 |
Number of the investment periods (usually moths). |
Where:
n: Number of periods
i: Interest rate
Vp: Present value
Vf: Future value
Name | Type | Default | Description |
---|---|---|---|
presentValue |
number | string | undefined |
Current or initial value of the investment. |
futureValue |
number | string | undefined |
Investment value after specified periods. |
interest |
number | string | undefined |
Interest rate of the investment. |
Where:
in: Nominal interest rate
n: Number of periods
i: Interest rate
Name | Type | Default | Description |
---|---|---|---|
interest |
number | string | undefined |
Interest rate of the investment. |
periods |
number | string | 12 |
Number of the investment periods (usually moths). |