{
  "$comment": "Machine-readable companion to https://valem.run/calculators/estonia/self-employed. Formula, inputs, outputs, engine-verified test vectors, cited sources and the re-runnable Valem ModelSpec behind the page.",
  "url": "https://valem.run/calculators/estonia/self-employed",
  "dataUrl": "https://valem.run/calculators/estonia/self-employed.json",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "Estonia fie model by Valem (https://valem.run/calculators/estonia/self-employed), 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/estonia/self-employed/verify",
  "country": "estonia",
  "countryName": "Estonia",
  "formula": "self-employed",
  "formulaName": "FIE",
  "title": "FIE — Estonia Freelancer Tax",
  "answer": "Your net income as an Estonian FIE is business income minus 22% income tax, a 2% additional security tax, and 33% social tax — which is charged on an annual minimum base even if you earn very little.",
  "lang": "en",
  "currency": "EUR",
  "taxYear": "2026",
  "verification": {
    "claim": "shape-only",
    "statement": "The rates in this model are illustrative. Its 2 self-test cases confirm the engine reproduces the shape of the charge, but the schedule is not the official one, so the amount will not match a real bill. The cited sources name the document that would replace it.",
    "selfTestCases": 2,
    "ratesAreIllustrative": true,
    "sourcesCheckedOn": "2026-08-22"
  },
  "sources": [
    {
      "label": "Estonian Tax and Customs Board — Self-employed persons, income tax",
      "url": "https://www.emta.ee/en/business-client/registration-business/businesses/self-employed-persons/income-tax",
      "checked": "2026-08-22"
    },
    {
      "label": "Estonian Tax and Customs Board — Social tax",
      "url": "https://www.emta.ee/en/business-client/taxes-and-payment/income-and-social-taxes/social-tax",
      "checked": "2026-08-22"
    }
  ],
  "terminalOutput": "netIncome",
  "inputs": [
    {
      "name": "annualRevenue",
      "type": "number",
      "label": "Annual business income (EUR)",
      "minimum": 0
    }
  ],
  "outputs": [
    {
      "name": "socialTax",
      "type": "number",
      "label": "Social tax (33%, min. applies)",
      "format": "number",
      "formula": "$round($max([annualRevenue * $const.socialRate, $const.socialTaxAnnualMinimum]), 2)"
    },
    {
      "name": "incomeTax",
      "type": "number",
      "label": "Income tax (22%)",
      "format": "number",
      "formula": "$round(annualRevenue * $const.incomeRate, 2)"
    },
    {
      "name": "additionalTax",
      "type": "number",
      "formula": "$round(annualRevenue * $const.additionalRate, 2)"
    },
    {
      "name": "netIncome",
      "type": "number",
      "label": "Net income / year",
      "format": "number",
      "formula": "$round($max([0, annualRevenue - socialTax - incomeTax - additionalTax]), 2)"
    }
  ],
  "testCases": [
    {
      "description": "40,000 EUR revenue, well above the social tax minimum base",
      "given": {
        "annualRevenue": 40000
      },
      "expect": {
        "socialTax": 13200,
        "incomeTax": 8800,
        "additionalTax": 800,
        "netIncome": 17200
      }
    },
    {
      "description": "5,000 EUR revenue — the social tax annual minimum binds",
      "given": {
        "annualRevenue": 5000
      },
      "expect": {
        "socialTax": 3508.56,
        "incomeTax": 1100,
        "additionalTax": 100,
        "netIncome": 291.44
      }
    }
  ],
  "spec": {
    "id": "self-employed-estonia",
    "version": "1.0.0",
    "schema": {
      "type": "object",
      "properties": {
        "annualRevenue": {
          "type": "number",
          "minimum": 0
        },
        "socialTax": {
          "type": "number",
          "readOnly": true
        },
        "incomeTax": {
          "type": "number",
          "readOnly": true
        },
        "additionalTax": {
          "type": "number",
          "readOnly": true
        },
        "netIncome": {
          "type": "number",
          "readOnly": true
        }
      },
      "required": [
        "annualRevenue"
      ]
    },
    "constants": {
      "socialRate": 0.33,
      "incomeRate": 0.22,
      "additionalRate": 0.02,
      "socialTaxAnnualMinimum": 3508.56
    },
    "defaultValues": [
      {
        "path": "$",
        "expr": "{ \"annualRevenue\": 40000 }"
      }
    ],
    "derivations": [
      {
        "path": "$.socialTax",
        "expr": "$round($max([annualRevenue * $const.socialRate, $const.socialTaxAnnualMinimum]), 2)"
      },
      {
        "path": "$.incomeTax",
        "expr": "$round(annualRevenue * $const.incomeRate, 2)"
      },
      {
        "path": "$.additionalTax",
        "expr": "$round(annualRevenue * $const.additionalRate, 2)"
      },
      {
        "path": "$.netIncome",
        "expr": "$round($max([0, annualRevenue - socialTax - incomeTax - additionalTax]), 2)"
      }
    ],
    "constraints": [],
    "viewDefinition": {
      "renderer": "builtin",
      "defaultView": "main",
      "views": [
        {
          "id": "main",
          "label": "Self-employed net income",
          "layout": "vertical",
          "components": [
            {
              "id": "illustrativeNotice",
              "type": "alert",
              "variant": "warning",
              "label": "Illustrative rates — not the official schedule",
              "text": "'This model taxes revenue directly, without deducting business expenses — a real FIE\\u2019s taxable profit is revenue minus documented costs, which this page does not collect. Social tax applies to a minimum annual base (10,632 EUR in 2026) regardless of actual income, so a very low-earning FIE still owes the minimum social tax shown here. Not tax advice.'"
            },
            {
              "id": "revenueField",
              "type": "numericField",
              "label": "Annual business income (EUR)",
              "bind": "$.annualRevenue",
              "placeholder": "40000"
            },
            {
              "id": "tiles",
              "type": "group",
              "layout": "horizontal",
              "components": [
                {
                  "id": "netTile",
                  "type": "statTile",
                  "label": "Net income / year",
                  "bind": "$.netIncome",
                  "format": "number"
                },
                {
                  "id": "socialTile",
                  "type": "statTile",
                  "label": "Social tax (33%, min. applies)",
                  "bind": "$.socialTax",
                  "format": "number"
                },
                {
                  "id": "incomeTile",
                  "type": "statTile",
                  "label": "Income tax (22%)",
                  "bind": "$.incomeTax",
                  "format": "number"
                }
              ]
            },
            {
              "id": "sources",
              "type": "sourceList",
              "label": "Sources",
              "items": [
                {
                  "label": "Estonian Tax and Customs Board — Self-employed persons, income tax",
                  "url": "https://www.emta.ee/en/business-client/registration-business/businesses/self-employed-persons/income-tax",
                  "date": "2026-08-22"
                },
                {
                  "label": "Estonian Tax and Customs Board — Social tax",
                  "url": "https://www.emta.ee/en/business-client/taxes-and-payment/income-and-social-taxes/social-tax",
                  "date": "2026-08-22"
                }
              ]
            }
          ]
        }
      ]
    },
    "tests": [
      {
        "description": "40,000 EUR revenue, well above the social tax minimum base",
        "given": {
          "$.annualRevenue": 40000
        },
        "expect": {
          "$.socialTax": 13200,
          "$.incomeTax": 8800,
          "$.additionalTax": 800,
          "$.netIncome": 17200
        }
      },
      {
        "description": "5,000 EUR revenue — the social tax annual minimum binds",
        "given": {
          "$.annualRevenue": 5000
        },
        "expect": {
          "$.socialTax": 3508.56,
          "$.incomeTax": 1100,
          "$.additionalTax": 100,
          "$.netIncome": 291.44
        }
      }
    ]
  }
}
