{
  "id": "credit-card-interest",
  "version": "09fc9e3648c8",
  "status": "published",
  "name": "Credit Card Interest Calculator",
  "question": "What is my credit card interest?",
  "summary": "Computes the interest a credit card balance builds in one billing cycle at the daily periodic rate, and how long a fixed monthly payment takes to pay it off.",
  "category": "finance",
  "subcategory": "loans",
  "url": "https://www.acalculator.org/finance/credit-card-interest-calculator",
  "markdown": "https://www.acalculator.org/finance/credit-card-interest-calculator.md",
  "kind": "schedule",
  "method": "Daily periodic rate d = APR ÷ days in a year; interest for a cycle of D days = balance × ((1 + d)^D − 1); each cycle the interest is added and the payment is taken off until the balance is 0.",
  "assumptions": [
    "Interest compounds daily at the daily periodic rate, and the balance does not change during the cycle.",
    "The payment is made at the end of each billing cycle, and every cycle has the same number of days.",
    "No new purchases, fees, or promotional rates; the APR does not change.",
    "The last payment is whatever is left. Values are not rounded to the cent between cycles."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "balance": {
        "title": "Card balance",
        "description": "The balance on the card that is charged interest.",
        "type": "number",
        "x-unit": "USD",
        "exclusiveMinimum": 0,
        "maximum": 10000000
      },
      "apr": {
        "title": "Purchase APR",
        "description": "The card’s annual percentage rate for the balance.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      },
      "days": {
        "title": "Days in the billing cycle",
        "description": "The number of days in one billing cycle, usually 28 to 31.",
        "type": "integer",
        "minimum": 1,
        "maximum": 31
      },
      "basis": {
        "title": "Days in a year",
        "description": "The number of days the card divides the APR by to get the daily rate: 365 or 360.",
        "type": "string",
        "enum": [
          "365",
          "360"
        ]
      },
      "payment": {
        "title": "Monthly payment",
        "description": "A fixed amount you pay at the end of every billing cycle. Leave it empty to see one cycle’s interest.",
        "type": "number",
        "x-unit": "USD",
        "exclusiveMinimum": 0,
        "maximum": 10000000
      }
    }
  },
  "outputs": {
    "cycle": {
      "label": "Interest this billing cycle",
      "description": "The interest the balance builds in one billing cycle at the daily periodic rate, compounded daily.",
      "format": "money"
    },
    "daily": {
      "label": "Daily periodic rate",
      "description": "The APR divided by the days in a year.",
      "format": "percent"
    },
    "effective": {
      "label": "Effective yearly rate",
      "description": "What the APR really costs in a year when interest compounds daily: (1 + daily rate)^days in a year − 1.",
      "format": "percent"
    },
    "months": {
      "label": "Months to pay it off",
      "description": "How many monthly payments clear the balance, if no new charges are made.",
      "format": "integer"
    },
    "interest": {
      "label": "Total interest",
      "description": "All the interest paid until the balance is 0.",
      "format": "money"
    },
    "paid": {
      "label": "Total of payments",
      "description": "The balance plus all the interest.",
      "format": "money"
    },
    "time": {
      "label": "Time to pay it off",
      "description": "The number of payments in years and months.",
      "format": "duration"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "balance": 5000,
      "apr": 22,
      "days": 30,
      "basis": "365",
      "payment": 200
    },
    "outputs": {
      "cycle": 91.20558919709855,
      "daily": 0.06027397260273973,
      "effective": 24.59941499122608,
      "months": 34,
      "interest": 1736.7529585927819,
      "paid": 6736.752958592782,
      "time": {
        "years": 2,
        "months": 10
      }
    },
    "text": "A $5,000.00 balance at 22% APR builds $91.21 of interest in a 30-day billing cycle."
  },
  "examples": [
    {
      "given": {
        "balance": 5000,
        "apr": 22,
        "days": 30,
        "basis": "365",
        "payment": 200
      },
      "expect": {
        "cycle": 91.20558919708532,
        "months": 34,
        "interest": 1736.7529585924058,
        "effective": 24.599414991222226
      },
      "source": "hand calculation in content.mdx; Python 3 in docs/progress/WP-31/python/credit_card.py"
    },
    {
      "given": {
        "balance": 1000,
        "apr": 18,
        "days": 30,
        "basis": "365"
      },
      "expect": {
        "cycle": 14.900800056363739,
        "daily": 0.049315068493150684
      },
      "source": "hand calculation in content.mdx: 1,000 × ((1 + 0.18 ÷ 365)^30 − 1)"
    },
    {
      "given": {
        "balance": 2000,
        "apr": 24,
        "days": 31,
        "basis": "360",
        "payment": 2100
      },
      "expect": {
        "months": 1,
        "cycle": 41.74934284586263,
        "interest": 41.74934284586263
      },
      "source": "hand calculation in content.mdx: 2,000 × ((1 + 0.24 ÷ 360)^31 − 1)"
    }
  ],
  "sources": [
    "Consumer Financial Protection Bureau, How does my credit card company calculate the amount of interest I owe? https://www.consumerfinance.gov/ask-cfpb/how-does-my-credit-card-company-calculate-the-amount-of-interest-i-owe-en-51/",
    "Regulation Z (Truth in Lending), 12 CFR 1026.14(b), Annual percentage rate for periodic statements: each periodic rate times the number of periods in a year. https://www.consumerfinance.gov/rules-policy/regulations/1026/14/",
    "Compound interest and the number of payments: S. A. Broverman, Mathematics of Investment and Credit, chapters 1 and 3."
  ],
  "related": [
    "loan-payoff",
    "personal-loan",
    "loan"
  ],
  "changelog": []
}
