{
  "id": "car-affordability",
  "version": "5a18f789110b",
  "status": "published",
  "name": "Car Affordability Calculator",
  "question": "What car price can I afford?",
  "summary": "Computes the most expensive car a monthly payment can buy, from the payment, loan rate and term, cash down, trade-in, sales tax and fees.",
  "category": "finance",
  "subcategory": "loans",
  "url": "https://www.acalculator.org/finance/car-affordability-calculator",
  "markdown": "https://www.acalculator.org/finance/car-affordability-calculator.md",
  "kind": "function",
  "method": "loan = payment × (1 − (1 + i)^−n) ÷ i with i = APR ÷ 12; price = trade-in + (loan + cash down − fees) ÷ (1 + sales tax rate).",
  "assumptions": [
    "A fixed-rate loan with equal monthly payments; sales tax and fees are added to the loan.",
    "Sales tax is charged on the price minus the trade-in, as the auto loan calculator assumes. States differ, so check your state’s rule.",
    "Insurance, fuel, maintenance and registration renewals are not included; budget for them on top of the payment.",
    "There is no answer when the fees are as large as, or larger than, the loan plus the cash down."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "payment": {
        "title": "Monthly payment you can afford",
        "description": "The most you want to pay each month on the car loan.",
        "type": "number",
        "x-unit": "USD",
        "exclusiveMinimum": 0,
        "maximum": 1000000
      },
      "down": {
        "title": "Cash down",
        "description": "The cash you pay up front.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 10000000
      },
      "trade": {
        "title": "Trade-in value",
        "description": "What the dealer pays for your current car. It also lowers the taxed price.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 10000000
      },
      "rate": {
        "title": "Interest rate (APR)",
        "description": "The yearly interest rate on the car loan.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 50
      },
      "term": {
        "title": "Loan term (months)",
        "description": "The number of monthly payments.",
        "type": "integer",
        "minimum": 1,
        "maximum": 120
      },
      "tax": {
        "title": "Sales tax rate",
        "description": "Your state and local sales tax rate, charged on the price minus the trade-in.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 25
      },
      "fees": {
        "title": "Dealer and registration fees",
        "description": "Title, registration, documentation and other fees, added to the loan.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000
      }
    }
  },
  "outputs": {
    "price": {
      "label": "Car price you can afford",
      "description": "The highest price before tax and fees that the payment, cash down and trade-in cover.",
      "format": "money"
    },
    "loan": {
      "label": "Loan amount",
      "description": "What the monthly payments repay: the price plus tax and fees, minus cash down and trade-in.",
      "format": "money"
    },
    "taxAmount": {
      "label": "Sales tax",
      "description": "The sales tax rate times the price minus the trade-in.",
      "format": "money"
    },
    "interest": {
      "label": "Total interest",
      "description": "All the monthly payments minus the loan amount.",
      "format": "money"
    },
    "totalCost": {
      "label": "Total cost of the car",
      "description": "Price, tax, fees and interest: cash down plus trade-in plus all the payments.",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "payment": 500,
      "down": 3000,
      "trade": 0,
      "rate": 7,
      "term": 60,
      "tax": 0,
      "fees": 0
    },
    "outputs": {
      "price": 28250.996750582246,
      "loan": 25250.996750582246,
      "taxAmount": 0,
      "interest": 4749.003249417754,
      "totalCost": 33000
    },
    "text": "A payment of $500.00 a month for 60 months at 7%, with $3,000.00 down, buys a car of up to $28,251.00."
  },
  "examples": [
    {
      "given": {
        "payment": 450,
        "down": 4000,
        "trade": 0,
        "rate": 6.5,
        "term": 60,
        "tax": 7,
        "fees": 600
      },
      "expect": {
        "price": 24671.87459131468,
        "loan": 22998.90581270671,
        "taxAmount": 1727.0312213920279,
        "interest": 4001.094187293289,
        "totalCost": 31000
      },
      "source": "hand calculation in content.mdx: loan = 450 × (1 − 1.0054167⁻⁶⁰) ÷ 0.0054167 = 22,998.91; price = (22,998.91 + 4,000 − 600) ÷ 1.07 = 24,671.87"
    },
    {
      "given": {
        "payment": 400,
        "down": 2000,
        "trade": 0,
        "rate": 0,
        "term": 48,
        "tax": 0,
        "fees": 0
      },
      "expect": {
        "price": 21200,
        "loan": 19200,
        "interest": 0
      },
      "source": "hand calculation in content.mdx: at 0%, loan = 400 × 48 = 19,200; price = 19,200 + 2,000 = 21,200"
    },
    {
      "given": {
        "payment": 400,
        "down": 2000,
        "trade": 0,
        "rate": 0,
        "term": 48,
        "tax": 6,
        "fees": 250
      },
      "expect": {
        "loan": 19200,
        "price": 19764.150943396224,
        "taxAmount": 1185.8490566037735
      },
      "source": "hand calculation in content.mdx: loan = 400 × 48 = 19,200; price = (19,200 + 2,000 − 250) ÷ 1.06 = 19,764.15"
    },
    {
      "given": {
        "payment": 552.7030456955181,
        "down": 6000,
        "trade": 0,
        "rate": 5,
        "term": 48,
        "tax": 0,
        "fees": 0
      },
      "expect": {
        "price": 30000,
        "loan": 24000
      },
      "source": "the reverse of the auto loan example ($30,000 price, $6,000 down, 5% for 48 months is $552.70 a month; amortized payment formula)",
      "tolerance": 1e-9
    },
    {
      "given": {
        "payment": 600,
        "down": 2000,
        "trade": 5000,
        "rate": 7,
        "term": 72,
        "tax": 6,
        "fees": 800
      },
      "expect": {
        "price": 39332.70430480253,
        "taxAmount": 2059.9622582881516,
        "totalCost": 50200
      },
      "source": "hand calculation in content.mdx: loan 35,192.67; price = 5,000 + (35,192.67 + 2,000 − 800) ÷ 1.06 = 39,332.70; tax on 34,332.70"
    }
  ],
  "sources": [
    "Consumer Financial Protection Bureau, How much can I afford to borrow for a car or auto loan? (price, taxes, title and fees add to the loan; down payment and trade-in reduce it; also budget for maintenance, gas and insurance). https://www.consumerfinance.gov/ask-cfpb/how-much-can-i-afford-to-borrow-for-a-car-or-auto-loan-en-751/",
    "Consumer Financial Protection Bureau, What is a debt-to-income ratio? https://www.consumerfinance.gov/ask-cfpb/what-is-a-debt-to-income-ratio-en-1791/",
    "Present value of a level payment (annuity), the inverse of the loan payment formula used by the auto loan calculator; derivation below."
  ],
  "related": [
    "auto-loan",
    "debt-to-income-ratio",
    "apr"
  ],
  "changelog": []
}
