{
  "id": "apy",
  "version": "18bc3811ea97",
  "status": "published",
  "name": "APY Calculator",
  "question": "What APY will my rate earn?",
  "summary": "Converts a stated interest rate to its annual percentage yield (APY) for daily, monthly, quarterly, twice-yearly, yearly or continuous compounding, and back.",
  "category": "finance",
  "subcategory": "investing",
  "url": "https://www.acalculator.org/finance/apy-calculator",
  "markdown": "https://www.acalculator.org/finance/apy-calculator.md",
  "kind": "formulas",
  "method": "APY = (1 + r ÷ n)^n − 1, where r is the stated yearly rate and n the times interest is compounded a year; APY = e^r − 1 for continuous compounding.",
  "assumptions": [
    "The rate stays the same for the whole year and all interest stays in the account.",
    "Daily compounding uses 365 days a year.",
    "No fees. Regulation DD’s APY for a set amount of interest earned over a term is APY = (1 + interest ÷ principal)^(365 ÷ days) − 1; for a full year of compounding this is the same as the formula above."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "rate": {
        "title": "Interest rate",
        "description": "The stated yearly interest rate before compounding (the nominal rate).",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      },
      "apy": {
        "title": "APY",
        "description": "The annual percentage yield: what the balance earns in a year with compounding, as a percent.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 200
      },
      "comp": {
        "title": "Interest is compounded",
        "description": "How often interest is added to the balance: daily (365 times a year), monthly, quarterly, twice a year, yearly or continuously.",
        "type": "string",
        "enum": [
          "365",
          "12",
          "4",
          "2",
          "1",
          "continuous"
        ]
      }
    }
  },
  "solve": {
    "fillAny": 1,
    "variables": [
      "rate",
      "apy"
    ],
    "inputsOnly": []
  },
  "outputs": {
    "rate": {
      "label": "Interest rate",
      "description": "The stated yearly interest rate before compounding (the nominal rate).",
      "format": "percent"
    },
    "apy": {
      "label": "APY",
      "description": "The annual percentage yield: what the balance earns in a year with compounding, as a percent.",
      "format": "percent"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "comp": "365",
      "rate": 4
    },
    "outputs": {
      "apy": 4.080849313244516
    },
    "text": "An interest rate of 4% compounded daily is an APY of 4.081%."
  },
  "examples": [
    {
      "given": {
        "rate": 6,
        "comp": "12"
      },
      "expect": {
        "apy": 6.1677811864499565
      },
      "source": "Regulation DD (12 CFR 1030) appendix A: $61.68 of interest on $1,000 for a 365-day year is an APY of 6.17%; (1 + 0.06/12)^12 − 1 = 6.1678%"
    },
    {
      "given": {
        "rate": 5,
        "comp": "365"
      },
      "expect": {
        "apy": 5.126749646746255
      },
      "source": "hand calculation in content.mdx: (1 + 0.05/365)^365 − 1 = 5.1267%"
    },
    {
      "given": {
        "apy": 5,
        "comp": "12"
      },
      "expect": {
        "rate": 4.888948540377963
      },
      "source": "hand calculation in content.mdx: 12 × ((1.05)^(1/12) − 1) = 4.8889%"
    },
    {
      "given": {
        "rate": 5,
        "comp": "continuous"
      },
      "expect": {
        "apy": 5.127109637602404
      },
      "source": "hand calculation in content.mdx: e^0.05 − 1 = 5.1271%"
    },
    {
      "given": {
        "rate": 8,
        "comp": "4"
      },
      "expect": {
        "apy": 8.243215999999999
      },
      "source": "hand calculation in content.mdx: (1 + 0.08/4)^4 − 1 = 1.02^4 − 1 = 8.2432%"
    },
    {
      "given": {
        "apy": 5,
        "comp": "continuous"
      },
      "expect": {
        "rate": 4.879016416943201
      },
      "source": "hand calculation in content.mdx: ln(1.05) = 4.8790%"
    },
    {
      "given": {
        "rate": 3,
        "comp": "1"
      },
      "expect": {
        "apy": 3
      },
      "source": "Regulation DD appendix A: for a 365-day term, APY = 100 × interest ÷ principal; yearly compounding at 3% pays 3%"
    }
  ],
  "sources": [
    "Regulation DD (Truth in Savings), 12 CFR part 1030, appendix A, Part I: APY = 100 [(1 + Interest/Principal)^(365/Days in term) − 1]; $61.68 of interest on $1,000 for a 365-day year is an APY of 6.17%. https://www.law.cornell.edu/cfr/text/12/appendix-A_to_part_1030",
    "Consumer Financial Protection Bureau, Regulation DD, 12 CFR 1030.2: definition of annual percentage yield. https://www.consumerfinance.gov/rules-policy/regulations/1030/2/"
  ],
  "related": [
    "compound-interest",
    "apr"
  ],
  "changelog": []
}
