{
  "$comment": "Machine-readable companion to https://valem.run/calculators/latvia/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/latvia/self-employed",
  "dataUrl": "https://valem.run/calculators/latvia/self-employed.json",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "Latvia mikrouzņēmuma nodoklis model by Valem (https://valem.run/calculators/latvia/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/latvia/self-employed/verify",
  "country": "latvia",
  "countryName": "Latvia",
  "formula": "self-employed",
  "formulaName": "Mikrouzņēmuma nodoklis",
  "title": "Mikrouzņēmuma Nodoklis — Latvia self-employed calculator",
  "answer": "Your net income under Latvia's microenterprise tax is revenue minus a flat 25%, with no separate expense deduction, available up to 40,000 EUR of annual turnover.",
  "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": "Valsts ieņēmumu dienests (VID) — self-employed persons, individual entrepreneurs",
      "url": "https://www.vid.gov.lv/en/self-employed-persons-individual-entrepreneurs",
      "checked": "2026-08-22"
    },
    {
      "label": "Balansis — Micro-Enterprise Tax Latvia 2026",
      "url": "https://balansis.lv/en/blog/micro-enterprise-tax-2026/",
      "checked": "2026-08-22"
    }
  ],
  "terminalOutput": "capExcess",
  "inputs": [
    {
      "name": "annualRevenue",
      "type": "number",
      "label": "Annual revenue (EUR)",
      "minimum": 0
    }
  ],
  "outputs": [
    {
      "name": "microTax",
      "type": "number",
      "label": "Microenterprise tax (25%)",
      "format": "number",
      "formula": "$round(annualRevenue * $const.metRate, 2)"
    },
    {
      "name": "netIncome",
      "type": "number",
      "label": "Net income / year",
      "format": "number",
      "formula": "$round(annualRevenue - microTax, 2)"
    },
    {
      "name": "capExcess",
      "type": "number",
      "formula": "$round($max([0, annualRevenue - $const.capRevenue]), 2)"
    }
  ],
  "testCases": [
    {
      "description": "25,000 EUR revenue, within the microenterprise cap",
      "given": {
        "annualRevenue": 25000
      },
      "expect": {
        "microTax": 6250,
        "netIncome": 18750,
        "capExcess": 0
      }
    },
    {
      "description": "revenue above the 40,000 EUR cap",
      "given": {
        "annualRevenue": 45000
      },
      "expect": {
        "microTax": 11250,
        "netIncome": 33750,
        "capExcess": 5000
      }
    }
  ],
  "spec": {
    "id": "self-employed-latvia",
    "version": "1.0.0",
    "schema": {
      "type": "object",
      "properties": {
        "annualRevenue": {
          "type": "number",
          "minimum": 0
        },
        "microTax": {
          "type": "number",
          "readOnly": true
        },
        "netIncome": {
          "type": "number",
          "readOnly": true
        },
        "capExcess": {
          "type": "number",
          "readOnly": true,
          "description": "Revenue above the 40,000 EUR microenterprise cap; 0 when within it"
        }
      },
      "required": [
        "annualRevenue"
      ]
    },
    "constants": {
      "metRate": 0.25,
      "capRevenue": 40000
    },
    "defaultValues": [
      {
        "path": "$",
        "expr": "{ \"annualRevenue\": 25000 }"
      }
    ],
    "derivations": [
      {
        "path": "$.microTax",
        "expr": "$round(annualRevenue * $const.metRate, 2)"
      },
      {
        "path": "$.netIncome",
        "expr": "$round(annualRevenue - microTax, 2)"
      },
      {
        "path": "$.capExcess",
        "expr": "$round($max([0, annualRevenue - $const.capRevenue]), 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 models the microenterprise tax (MET) regime — 25% of gross revenue, no expense deduction — available up to 40,000 EUR of annual turnover. The alternative general self-employed regime (VSAOI social contributions plus IIN income tax on net profit after expenses) can be cheaper for a business with high documented costs; this page shows the simpler flat-rate option only. Not tax advice.'"
            },
            {
              "id": "revenueField",
              "type": "numericField",
              "label": "Annual revenue (EUR)",
              "bind": "$.annualRevenue",
              "placeholder": "25000"
            },
            {
              "id": "tiles",
              "type": "group",
              "layout": "horizontal",
              "components": [
                {
                  "id": "netTile",
                  "type": "statTile",
                  "label": "Net income / year",
                  "bind": "$.netIncome",
                  "format": "number"
                },
                {
                  "id": "taxTile",
                  "type": "statTile",
                  "label": "Microenterprise tax (25%)",
                  "bind": "$.microTax",
                  "format": "number"
                }
              ]
            },
            {
              "id": "capNote",
              "type": "staticText",
              "text": "capExcess > 0 ? ('Revenue is ' & $string(capExcess) & ' EUR over the microenterprise cap — the general self-employed regime would apply instead of MET.') : 'Within the 40,000 EUR microenterprise turnover cap.'"
            },
            {
              "id": "sources",
              "type": "sourceList",
              "label": "Sources",
              "items": [
                {
                  "label": "Valsts ieņēmumu dienests (VID) — self-employed persons, individual entrepreneurs",
                  "url": "https://www.vid.gov.lv/en/self-employed-persons-individual-entrepreneurs",
                  "date": "2026-08-22"
                },
                {
                  "label": "Balansis — Micro-Enterprise Tax Latvia 2026",
                  "url": "https://balansis.lv/en/blog/micro-enterprise-tax-2026/",
                  "date": "2026-08-22"
                }
              ]
            }
          ]
        }
      ]
    },
    "tests": [
      {
        "description": "25,000 EUR revenue, within the microenterprise cap",
        "given": {
          "$.annualRevenue": 25000
        },
        "expect": {
          "$.microTax": 6250,
          "$.netIncome": 18750,
          "$.capExcess": 0
        }
      },
      {
        "description": "revenue above the 40,000 EUR cap",
        "given": {
          "$.annualRevenue": 45000
        },
        "expect": {
          "$.microTax": 11250,
          "$.netIncome": 33750,
          "$.capExcess": 5000
        }
      }
    ]
  }
}
