{
  "id": "interest",
  "version": "d127aebfbde2",
  "status": "published",
  "name": "Interest Calculator",
  "question": "What is my monthly interest?",
  "summary": "Computes the interest a savings balance earns each month and in total, at a yearly rate compounded daily, monthly, quarterly, twice a year or yearly, with an optional monthly deposit.",
  "category": "finance",
  "subcategory": "investing",
  "url": "https://www.acalculator.org/finance/interest-calculator",
  "markdown": "https://www.acalculator.org/finance/interest-calculator.md",
  "kind": "schedule",
  "method": "Each month, interest = balance × ((1 + r/m)^(m/12) − 1), where r is the yearly rate and m the compoundings a year; then the deposit is added.",
  "assumptions": [
    "The rate does not change.",
    "Deposits are added at the end of each month.",
    "With daily, quarterly, twice-yearly or yearly compounding, interest builds at the equivalent monthly rate, so the balance matches P(1 + r/m)^(mt) at every compounding date.",
    "Tax and fees are not included."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "principal": {
        "title": "Balance",
        "description": "The amount in the account at the start.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      },
      "rate": {
        "title": "Interest rate (yearly)",
        "description": "The nominal yearly interest rate, before compounding.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      },
      "comp": {
        "title": "Compounding",
        "description": "How many times a year interest is added to the balance: daily (365), monthly (12), quarterly (4), twice a year (2) or yearly (1).",
        "type": "string",
        "enum": [
          "365",
          "12",
          "4",
          "2",
          "1"
        ]
      },
      "deposit": {
        "title": "Added each month",
        "description": "A deposit added at the end of every month. Leave it empty or 0 for none.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 100000000
      },
      "months": {
        "title": "Number of months",
        "description": "How many months the balance earns interest.",
        "type": "integer",
        "minimum": 1,
        "maximum": 600
      }
    }
  },
  "outputs": {
    "first": {
      "label": "Interest in the first month",
      "description": "The starting balance × the monthly rate.",
      "format": "money"
    },
    "interest": {
      "label": "Total interest",
      "description": "All the interest earned over the months.",
      "format": "money"
    },
    "average": {
      "label": "Average interest a month",
      "description": "The total interest divided by the number of months.",
      "format": "money"
    },
    "last": {
      "label": "Interest in the last month",
      "description": "The interest earned in the final month.",
      "format": "money"
    },
    "balance": {
      "label": "Ending balance",
      "description": "The balance after the last month.",
      "format": "money"
    },
    "paidIn": {
      "label": "Money put in",
      "description": "The starting balance plus every deposit.",
      "format": "money"
    },
    "monthly": {
      "label": "Monthly rate",
      "description": "The rate earned each month: (1 + yearly rate ÷ m)^(m ÷ 12) − 1 for m compoundings a year.",
      "format": "percent"
    },
    "apy": {
      "label": "APY",
      "description": "The annual percentage yield: (1 + yearly rate ÷ m)^m − 1.",
      "format": "percent"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "principal": 10000,
      "rate": 5,
      "comp": "12",
      "deposit": 0,
      "months": 12
    },
    "outputs": {
      "first": 41.666666666666664,
      "interest": 511.61897881733177,
      "average": 42.63491490144431,
      "last": 43.616676260652824,
      "balance": 10511.61897881733,
      "paidIn": 10000,
      "monthly": 0.4166666666666667,
      "apy": 5.116189788173318
    },
    "text": "At 5% a year, $10,000.00 earns $41.67 of interest in the first month and $511.62 over the whole time."
  },
  "examples": [
    {
      "given": {
        "principal": 10000,
        "rate": 5,
        "comp": "12",
        "months": 12
      },
      "expect": {
        "first": 41.666666666666664,
        "interest": 511.61897881733177,
        "balance": 10511.61897881733,
        "apy": 5.116189788173318,
        "last": 43.616676260652824
      },
      "source": "SEC Investor.gov compound interest formula A = P(1 + r/n)^(nt) (https://www.investor.gov/financial-tools-calculators/calculators/compound-interest-calculator); hand calculation in content.mdx"
    },
    {
      "given": {
        "principal": 25000,
        "rate": 4,
        "comp": "365",
        "months": 12
      },
      "expect": {
        "first": 83.46779555086371,
        "interest": 1020.2123283111288,
        "apy": 4.080849313244516
      },
      "source": "SEC Investor.gov compound interest formula with daily compounding (https://www.investor.gov/financial-tools-calculators/calculators/compound-interest-calculator); hand calculation in content.mdx"
    },
    {
      "given": {
        "principal": 0,
        "rate": 6,
        "comp": "12",
        "deposit": 100,
        "months": 12
      },
      "expect": {
        "first": 0,
        "balance": 1233.5562372899913,
        "interest": 33.55623728999138,
        "paidIn": 1200,
        "average": 2.796353107499282
      },
      "source": "future value of an annuity (Microsoft Excel FV function, https://support.microsoft.com/en-us/office/fv-function-2eef9f44-a084-4c61-bdd8-4fe4bb1b71b3); hand calculation in content.mdx"
    },
    {
      "given": {
        "principal": 10000,
        "rate": 6,
        "comp": "1",
        "months": 24
      },
      "expect": {
        "balance": 11236,
        "interest": 1236
      },
      "source": "SEC Investor.gov compound interest formula with yearly compounding (https://www.investor.gov/financial-tools-calculators/calculators/compound-interest-calculator); hand calculation in content.mdx",
      "tolerance": 1e-12
    }
  ],
  "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",
    "Consumer Financial Protection Bureau, Regulation DD (Truth in Savings), 12 CFR 1030, Appendix A: annual percentage yield. https://www.consumerfinance.gov/rules-policy/regulations/1030/a/"
  ],
  "related": [
    "compound-interest",
    "simple-interest",
    "savings",
    "apy",
    "money-market"
  ],
  "changelog": []
}
