Skip to contents

Rounds up to whole dollars and returns 0 when the target is already met. From the Emergency fund chapter.

Usage

monthly_contribution_needed(target, current_balance, months)

Arguments

target

Target balance.

current_balance

Amount already saved.

months

Months until the deadline. Must be greater than 0.

Value

A numeric vector of whole dollar monthly contributions.

See also

Examples

# $9,600 target, $1,200 saved, want to finish in 18 months
monthly_contribution_needed(target = 9600, current_balance = 1200, months = 18)
#> [1] 467