{
  "$comment": "Machine-readable companion to https://valem.run/calculators/mexico/car-tax. Formula, inputs, outputs, engine-verified test vectors, cited sources and the re-runnable Valem ModelSpec behind the page.",
  "url": "https://valem.run/calculators/mexico/car-tax",
  "dataUrl": "https://valem.run/calculators/mexico/car-tax.json",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "Mexico refrendo y tenencia model by Valem (https://valem.run/calculators/mexico/car-tax), CC BY 4.0.",
    "note": "Covers the model — the expression of each rule and the arrangement of the catalog. The rates and thresholds themselves are law and are not licensed by anyone; the cited sources are where they come from."
  },
  "verificationUrl": "https://valem.run/calculators/mexico/car-tax/verify",
  "country": "mexico",
  "countryName": "Mexico",
  "formula": "car-tax",
  "formulaName": "Refrendo y tenencia",
  "title": "Refrendo y Tenencia — Mexico car tax",
  "answer": "Mexico's annual car cost is the state plate fee (refrendo), which every state charges, plus tenencia in the four states that still levy it.",
  "lang": "en",
  "currency": "MXN",
  "taxYear": "2026",
  "verification": {
    "claim": "internal-consistency",
    "statement": "The Valem engine reproduces this model's stated formula through 3 self-test cases (below, and re-runnable against the spec). That asserts internal consistency, NOT that the formula matches current law — the cited sources are the evidence for that, and carry the date each was last checked.",
    "selfTestCases": 3,
    "ratesAreIllustrative": false,
    "sourcesCheckedOn": "2026-08-02"
  },
  "sources": [
    {
      "label": "Finanzas CDMX",
      "url": "https://www.finanzas.cdmx.gob.mx",
      "checked": "2026-08-04"
    },
    {
      "label": "Tenencia vehicular 2026 por estado",
      "url": "https://www.tenenciavehicular.com.mx",
      "checked": "2026-08-04"
    }
  ],
  "terminalOutput": "total",
  "inputs": [
    {
      "name": "value",
      "type": "number",
      "label": "Valor del vehículo (MXN)",
      "minimum": 0
    },
    {
      "name": "estado",
      "type": "string",
      "label": "Estado"
    },
    {
      "name": "customRefrendo",
      "type": "number",
      "label": "Refrendo si « Otro » (MXN)",
      "minimum": 0
    }
  ],
  "outputs": [
    {
      "name": "refrendo",
      "type": "number",
      "label": "Refrendo (placa)",
      "format": "currency",
      "formula": "($e := estado; $round($e = 'CDMX' ? $const.refrendoCDMX : $e = 'EDOMEX' ? $const.refrendoEdomex : $e = 'JAL' ? $const.refrendoJalisco : $e = 'NL' ? $const.refrendoNuevoLeon : $e = 'OTRO_TENENCIA' ? $const.refrendoOtro : customRefrendo, 2))"
    },
    {
      "name": "cobraTenencia",
      "type": "number",
      "formula": "($e := estado; ($e = 'EDOMEX' or $e = 'OTRO_TENENCIA') ? 1 : 0)"
    },
    {
      "name": "tenencia",
      "type": "number",
      "label": "Tenencia",
      "format": "currency",
      "formula": "$round(cobraTenencia = 1 ? value * $const.tenenciaRate : 0, 2)"
    },
    {
      "name": "total",
      "type": "number",
      "label": "Total anual",
      "format": "currency",
      "formula": "$round(refrendo + tenencia, 2)"
    }
  ],
  "testCases": [
    {
      "description": "C1 CDMX, vehículo de 250,000 MXN — sólo refrendo",
      "given": {
        "value": 250000,
        "estado": "CDMX"
      },
      "expect": {
        "refrendo": 760,
        "cobraTenencia": 0,
        "tenencia": 0,
        "total": 760
      }
    },
    {
      "description": "C2 Estado de México, 600,000 MXN — sí cobra tenencia",
      "given": {
        "value": 600000,
        "estado": "EDOMEX"
      },
      "expect": {
        "refrendo": 990,
        "cobraTenencia": 1,
        "tenencia": 18000,
        "total": 18990
      }
    },
    {
      "description": "C3 Nuevo León — el refrendo más alto de los cuatro estados grandes",
      "given": {
        "value": 400000,
        "estado": "NL"
      },
      "expect": {
        "refrendo": 3368,
        "tenencia": 0,
        "total": 3368
      }
    }
  ],
  "spec": {
    "id": "car-tax-mexico",
    "version": "1.0.0",
    "schema": {
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "minimum": 0
        },
        "estado": {
          "type": "string"
        },
        "customRefrendo": {
          "type": "number",
          "minimum": 0
        },
        "refrendo": {
          "type": "number",
          "readOnly": true
        },
        "cobraTenencia": {
          "type": "number",
          "readOnly": true
        },
        "tenencia": {
          "type": "number",
          "readOnly": true
        },
        "total": {
          "type": "number",
          "readOnly": true
        }
      }
    },
    "constants": {
      "tenenciaRate": 0.03,
      "refrendoCDMX": 760,
      "refrendoEdomex": 990,
      "refrendoJalisco": 900,
      "refrendoNuevoLeon": 3368,
      "refrendoOtro": 850
    },
    "defaultValues": [
      {
        "path": "$",
        "expr": "{ 'value': 250000, 'estado': 'CDMX', 'customRefrendo': 850 }"
      }
    ],
    "derivations": [
      {
        "path": "$.refrendo",
        "expr": "($e := estado; $round($e = 'CDMX' ? $const.refrendoCDMX : $e = 'EDOMEX' ? $const.refrendoEdomex : $e = 'JAL' ? $const.refrendoJalisco : $e = 'NL' ? $const.refrendoNuevoLeon : $e = 'OTRO_TENENCIA' ? $const.refrendoOtro : customRefrendo, 2))"
      },
      {
        "path": "$.cobraTenencia",
        "expr": "($e := estado; ($e = 'EDOMEX' or $e = 'OTRO_TENENCIA') ? 1 : 0)"
      },
      {
        "path": "$.tenencia",
        "expr": "$round(cobraTenencia = 1 ? value * $const.tenenciaRate : 0, 2)"
      },
      {
        "path": "$.total",
        "expr": "$round(refrendo + tenencia, 2)"
      }
    ],
    "constraints": [],
    "metaDerivations": [],
    "viewDefinition": {
      "renderer": "builtin",
      "defaultView": "main",
      "views": [
        {
          "id": "main",
          "label": "Refrendo y tenencia",
          "layout": "vertical",
          "components": [
            {
              "id": "value",
              "type": "numericField",
              "label": "Valor del vehículo (MXN)",
              "bind": "$.value"
            },
            {
              "id": "estado",
              "type": "selectField",
              "label": "Estado",
              "bind": "$.estado",
              "helperText": "El refrendo lo cobra cada estado; la tenencia sólo sigue vigente en unos pocos.",
              "options": [
                {
                  "value": "CDMX",
                  "label": "Ciudad de México — refrendo $760, tenencia subsidiada al 100%"
                },
                {
                  "value": "EDOMEX",
                  "label": "Estado de México — refrendo ~$990 y SÍ cobra tenencia"
                },
                {
                  "value": "JAL",
                  "label": "Jalisco — refrendo $900, tenencia subsidiada al 100%"
                },
                {
                  "value": "NL",
                  "label": "Nuevo León — refrendo $3,368 (modelos 2015-2026), tenencia subsidiada"
                },
                {
                  "value": "OTRO_TENENCIA",
                  "label": "Oaxaca, Quintana Roo o Zacatecas — también cobran tenencia"
                },
                {
                  "value": "otro",
                  "label": "Otro estado — capturar el refrendo (sin tenencia)"
                }
              ]
            },
            {
              "id": "refrendoInput",
              "type": "numericField",
              "label": "Refrendo si « Otro » (MXN)",
              "bind": "$.customRefrendo"
            },
            {
              "id": "tiles",
              "type": "group",
              "layout": "horizontal",
              "components": [
                {
                  "id": "totalTile",
                  "type": "statTile",
                  "label": "Total anual",
                  "bind": "$.total",
                  "format": "currency",
                  "currency": "MXN"
                }
              ]
            },
            {
              "id": "breakdown",
              "type": "keyValueList",
              "label": "Detalle",
              "items": [
                {
                  "label": "Refrendo (placa)",
                  "bind": "$.refrendo",
                  "format": "currency",
                  "currency": "MXN"
                },
                {
                  "label": "Tenencia",
                  "bind": "$.tenencia",
                  "format": "currency",
                  "currency": "MXN"
                },
                {
                  "label": "Total",
                  "bind": "$.total",
                  "format": "currency",
                  "currency": "MXN"
                }
              ]
            },
            {
              "id": "note",
              "type": "staticText",
              "text": "'México 2026: el refrendo (placa) lo cobra cada estado. La tenencia federal desapareció y sólo la mantienen el Estado de México, Oaxaca, Quintana Roo y Zacatecas; la CDMX, Jalisco, Nuevo León y la mayoría de las entidades la subsidian al 100%, así que en la práctica no se paga. Aunque estés exento de tenencia, el refrendo siempre se paga. Estimación, no es asesoría fiscal.'"
            },
            {
              "id": "sources",
              "type": "sourceList",
              "label": "Fuentes",
              "items": [
                {
                  "label": "Finanzas CDMX",
                  "url": "https://www.finanzas.cdmx.gob.mx",
                  "date": "2026-08-04"
                },
                {
                  "label": "Tenencia vehicular 2026 por estado",
                  "url": "https://www.tenenciavehicular.com.mx",
                  "date": "2026-08-04"
                }
              ]
            }
          ]
        }
      ]
    },
    "tests": [
      {
        "description": "C1 CDMX, vehículo de 250,000 MXN — sólo refrendo",
        "given": {
          "$.value": 250000,
          "$.estado": "CDMX"
        },
        "expect": {
          "$.refrendo": 760,
          "$.cobraTenencia": 0,
          "$.tenencia": 0,
          "$.total": 760
        }
      },
      {
        "description": "C2 Estado de México, 600,000 MXN — sí cobra tenencia",
        "given": {
          "$.value": 600000,
          "$.estado": "EDOMEX"
        },
        "expect": {
          "$.refrendo": 990,
          "$.cobraTenencia": 1,
          "$.tenencia": 18000,
          "$.total": 18990
        }
      },
      {
        "description": "C3 Nuevo León — el refrendo más alto de los cuatro estados grandes",
        "given": {
          "$.value": 400000,
          "$.estado": "NL"
        },
        "expect": {
          "$.refrendo": 3368,
          "$.tenencia": 0,
          "$.total": 3368
        }
      }
    ]
  }
}
