{
  "id": "investment",
  "version": "18a0f954d4fd",
  "status": "published",
  "name": "Investment Calculator",
  "question": "How will my investment grow?",
  "summary": "Computes what a starting amount plus regular monthly or yearly contributions grows to at a fixed yearly return, and how much of it is growth.",
  "category": "finance",
  "subcategory": "investing",
  "url": "https://www.acalculator.org/finance/investment-calculator",
  "markdown": "https://www.acalculator.org/finance/investment-calculator.md",
  "kind": "schedule",
  "method": "Each month the balance grows at the monthly rate (1 + R)^(1/12) − 1, where R is the yearly return; contributions are added at the start or end of each month (monthly) or of each year (yearly).",
  "assumptions": [
    "The yearly return stays the same every year. Real returns go up and down, and can be negative.",
    "Growth compounds monthly at the rate that gives exactly the yearly return over 12 months.",
    "A raise applies from the start of year 2, and again each year after.",
    "No fees or taxes are taken out, unless you lower the return to allow for them.",
    "“In today’s money” divides the final balance by (1 + inflation)^years.",
    "This is an estimate for planning, not financial advice."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "start": {
        "title": "Starting amount",
        "description": "The amount invested today.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      },
      "add": {
        "title": "Contribution",
        "description": "The amount added each month or each year, depending on how often you add it.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 100000000
      },
      "freq": {
        "title": "How often do you add it?",
        "description": "Whether the contribution is added every month (12 times a year) or once a year.",
        "type": "string",
        "enum": [
          "12",
          "1"
        ]
      },
      "rate": {
        "title": "Expected yearly return",
        "description": "The yearly return, as the percent the balance grows in a year. It stays the same every year.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 50
      },
      "years": {
        "title": "For how long? (years)",
        "description": "How many years the money is invested.",
        "type": "integer",
        "minimum": 1,
        "maximum": 60
      },
      "when": {
        "title": "Contributions are added at the",
        "description": "Start or end of each period. A monthly contribution at the start of a month earns that month’s growth.",
        "type": "string",
        "enum": [
          "end",
          "start"
        ]
      },
      "raise": {
        "title": "Raise contributions each year by",
        "description": "The percent the contribution goes up at the start of each new year.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 50
      },
      "inflation": {
        "title": "Prices rise each year by",
        "description": "The yearly inflation rate used to show the final balance in today’s money.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 50
      }
    }
  },
  "outputs": {
    "fv": {
      "label": "You’ll have",
      "description": "The balance at the end of the last month.",
      "format": "money"
    },
    "paidIn": {
      "label": "Your money",
      "description": "The starting amount plus every contribution.",
      "format": "money"
    },
    "contributions": {
      "label": "Contributions",
      "description": "Every contribution added, without the starting amount.",
      "format": "money"
    },
    "growth": {
      "label": "Growth",
      "description": "The final balance minus your money.",
      "format": "money"
    },
    "real": {
      "label": "In today’s money",
      "description": "The final balance divided by (1 + inflation) to the power of the years.",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "start": 10000,
      "add": 500,
      "freq": "12",
      "rate": 7,
      "years": 20,
      "when": "end",
      "raise": 0,
      "inflation": 3
    },
    "outputs": {
      "fv": 292465.0329065481,
      "paidIn": 130000,
      "contributions": 120000,
      "growth": 162465.03290654812,
      "real": 161930.79766766416
    },
    "text": "Putting in $130,000.00 over 20 years at 7% a year grows to $292,465.03, of which $162,465.03 is growth."
  },
  "examples": [
    {
      "given": {
        "start": 20000,
        "freq": "12",
        "rate": 7,
        "years": 10,
        "when": "end",
        "inflation": 3
      },
      "expect": {
        "fv": 39343.027145791326,
        "growth": 19343.027145791326,
        "real": 29274.90709279999
      },
      "source": "hand calculation in content.mdx: 20,000 × 1.07^10 (SEC Investor.gov compound interest formula)"
    },
    {
      "given": {
        "start": 0,
        "add": 500,
        "freq": "12",
        "rate": 6,
        "years": 30,
        "when": "end"
      },
      "expect": {
        "fv": 487256.48652598716,
        "paidIn": 180000,
        "growth": 307256.48652598716
      },
      "source": "future value of an annuity, hand calculation in content.mdx"
    },
    {
      "given": {
        "start": 1000,
        "add": 6000,
        "freq": "1",
        "rate": 5,
        "years": 3,
        "when": "start"
      },
      "expect": {
        "fv": 21018.375,
        "contributions": 18000
      },
      "source": "hand calculation in content.mdx: 1,000 × 1.05³ + 6,000 × (1.05³ + 1.05² + 1.05)"
    },
    {
      "given": {
        "start": 0,
        "add": 100,
        "freq": "12",
        "rate": 0,
        "years": 2,
        "when": "end",
        "raise": 10
      },
      "expect": {
        "fv": 2520,
        "paidIn": 2520,
        "growth": 0
      },
      "source": "hand calculation in content.mdx: 12 × 100 + 12 × 110"
    }
  ],
  "sources": [
    "U.S. Securities and Exchange Commission, Investor.gov compound interest calculator and formula. https://www.investor.gov/financial-tools-calculators/calculators/compound-interest-calculator",
    "Future value of an annuity and equivalent periodic rates: S. A. Broverman, Mathematics of Investment and Credit, chapters 1 and 2."
  ],
  "related": [
    "compound-interest",
    "savings",
    "future-value",
    "sip"
  ],
  "changelog": []
}
