Created
November 16, 2017 20:19
-
-
Save cmaher/6fd5300c39348270c61f5f94cc8ea169 to your computer and use it in GitHub Desktop.
savings equation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function savings(principal, rate, contributions, years) { | |
return (principal * ((1 + rate) ** years)) + (contributions * ((((1 + rate) ** years) - 1) / rate)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment