{
  "name": "thai_income_tax",
  "slug": "income-tax-calculator",
  "description": {
    "th": "คำนวณภาษีเงินได้บุคคลธรรมดาทั้งปี (ภ.ง.ด.90/91) จากเงินเดือน ฟรีแลนซ์ ค่าเช่า วิชาชีพ ธุรกิจ หักค่าใช้จ่าย ค่าลดหย่อน เงินบริจาค ได้ภาษีแยกขั้น ภาษีที่ต้องจ่ายหรือขอคืน และวงเงินกองทุนที่ซื้อเพิ่มได้ พร้อมลิงก์เปิดเครื่องคำนวณ",
    "en": "Computes a full year of Thai personal income tax (PND 90/91) from salary, freelance, rent, profession and business income with expenses, allowances and donations. Returns tax by band, tax due or refund, remaining fund room and a link to the calculator."
  },
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "year": {
        "description": "Buddhist-era tax year; default 2569. Supported: 2569, 2568.",
        "anyOf": [
          {
            "type": "integer",
            "enum": [
              2569,
              2568
            ]
          },
          {
            "type": "string",
            "enum": [
              "2569",
              "2568"
            ]
          }
        ]
      },
      "salary": {
        "description": "Yearly salary, wages and bonus (40(1)), baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "freelance": {
        "description": "Yearly fees, commissions, freelance service income (40(2)), baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "rent": {
        "description": "Yearly rent from a house, building or land (40(5)), baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "profession": {
        "description": "Yearly liberal-profession income (40(6)), baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "business": {
        "description": "Yearly business, trading or online-selling income (40(8)), baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "businessActualExpense": {
        "description": "Actual business expenses instead of the 60% flat rate (0 = flat), baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "maternity": {
        "description": "Pregnancy and childbirth costs, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "sso": {
        "description": "Social security contributions paid in the year, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "lifeInsurance": {
        "description": "Life insurance premiums, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "healthInsurance": {
        "description": "Own health insurance premiums, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "parentsHealth": {
        "description": "Parents' health insurance premiums, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "pension": {
        "description": "Pension (annuity) insurance premiums, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "provident": {
        "description": "Provident fund / government pension fund contributions, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "rmf": {
        "description": "RMF purchases, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "nsf": {
        "description": "National Savings Fund (กอช.) contributions, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "thaiEsg": {
        "description": "Thai ESG fund purchases, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "thaiEsgxLtf": {
        "description": "Thai ESGX switched from LTF, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "homeLoanInterest": {
        "description": "Home loan interest, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "eReceiptGeneral": {
        "description": "Easy E-Receipt general spending, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "eReceiptCommunity": {
        "description": "Easy E-Receipt community-enterprise spending, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "other": {
        "description": "Any other allowance the caller has already worked out, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "donation": {
        "description": "Ordinary donations, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "donationDouble": {
        "description": "Donations that count double (education, sport, hospitals ...), baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "politicalDonation": {
        "description": "Donation to a political party, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "withheld": {
        "description": "Tax already withheld (50 ทวิ) and any half-year tax paid, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "professionMedical": {
        "description": "The profession income is medical (60% expense rate instead of 30%).",
        "type": "boolean"
      },
      "spouse": {
        "description": "Spouse with no income (spouse allowance).",
        "type": "boolean"
      },
      "children": {
        "description": "Children claimed.",
        "type": "integer",
        "minimum": 0,
        "maximum": 99
      },
      "childrenExtra": {
        "description": "Of the children, how many get the extra allowance (2nd+ born 2018 or later); at most children − 1.",
        "type": "integer",
        "minimum": 0,
        "maximum": 98
      },
      "parents": {
        "description": "Parents (own and spouse) aged 60+ claimed.",
        "type": "integer",
        "minimum": 0,
        "maximum": 4
      },
      "disabled": {
        "description": "Disabled or incapacitated dependants in your care.",
        "type": "integer",
        "minimum": 0,
        "maximum": 99
      }
    },
    "additionalProperties": false
  }
}
