{
  "$comment": "Machine-readable companion to https://valem.run/calculators/latvia/net-salary. Formula, inputs, outputs, engine-verified test vectors, cited sources and the re-runnable Valem ModelSpec behind the page.",
  "url": "https://valem.run/calculators/latvia/net-salary",
  "dataUrl": "https://valem.run/calculators/latvia/net-salary.json",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "Latvia alga uz rokas model by Valem (https://valem.run/calculators/latvia/net-salary), 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/net-salary/verify",
  "country": "latvia",
  "countryName": "Latvia",
  "formula": "net-salary",
  "formulaName": "Alga uz rokas",
  "title": "Algas Kalkulators — Latvia net salary",
  "answer": "Your Latvian take-home is gross minus 10.5% social insurance and 25.5% income tax on the amount above the non-taxable minimum.",
  "lang": "en",
  "currency": "EUR",
  "taxYear": "2026",
  "verification": {
    "claim": "internal-consistency",
    "statement": "The Valem engine reproduces this model's stated formula through 2 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": 2,
    "ratesAreIllustrative": false,
    "sourcesCheckedOn": "2026-08-02"
  },
  "sources": [
    {
      "label": "VID",
      "url": "https://www.vid.gov.lv",
      "checked": "2026-08-02"
    }
  ],
  "terminalOutput": "netMonthly",
  "inputs": [
    {
      "name": "grossMonthly",
      "type": "number",
      "label": "Bruto alga / mēnesī (EUR)",
      "format": "currency",
      "minimum": 0
    }
  ],
  "outputs": [
    {
      "name": "social",
      "type": "number",
      "label": "VSAOI (10,5%)",
      "format": "currency",
      "formula": "$round(grossMonthly * $const.socialRate, 2)"
    },
    {
      "name": "taxBase",
      "type": "number",
      "label": "Ar nodokli apliekamā",
      "format": "currency",
      "formula": "($b := grossMonthly - social - $const.nonTaxableMin; $round($b > 0 ? $b : 0, 2))"
    },
    {
      "name": "pit",
      "type": "number",
      "label": "IIN (25,5%)",
      "format": "currency",
      "formula": "$round(taxBase * $const.pitRate, 2)"
    },
    {
      "name": "netMonthly",
      "type": "number",
      "label": "Uz rokas / mēnesī",
      "format": "currency",
      "formula": "$round(grossMonthly - social - pit, 2)"
    }
  ],
  "testCases": [
    {
      "description": "S1 1,500 EUR",
      "given": {
        "grossMonthly": 1500
      },
      "expect": {
        "social": 157.5,
        "taxBase": 792.5,
        "pit": 202.09,
        "netMonthly": 1140.41
      }
    },
    {
      "description": "S3 10,000 EUR",
      "given": {
        "grossMonthly": 10000
      },
      "expect": {
        "social": 1050,
        "taxBase": 8400
      }
    }
  ],
  "spec": {
    "id": "net-salary-latvia",
    "version": "1.0.0",
    "schema": {
      "type": "object",
      "properties": {
        "grossMonthly": {
          "type": "number",
          "minimum": 0
        },
        "social": {
          "type": "number",
          "readOnly": true
        },
        "taxBase": {
          "type": "number",
          "readOnly": true
        },
        "pit": {
          "type": "number",
          "readOnly": true
        },
        "netMonthly": {
          "type": "number",
          "readOnly": true
        }
      }
    },
    "constants": {
      "socialRate": 0.105,
      "pitRate": 0.255,
      "nonTaxableMin": 550
    },
    "defaultValues": [
      {
        "path": "$",
        "expr": "{ 'grossMonthly': 1500 }"
      }
    ],
    "derivations": [
      {
        "path": "$.social",
        "expr": "$round(grossMonthly * $const.socialRate, 2)"
      },
      {
        "path": "$.taxBase",
        "expr": "($b := grossMonthly - social - $const.nonTaxableMin; $round($b > 0 ? $b : 0, 2))"
      },
      {
        "path": "$.pit",
        "expr": "$round(taxBase * $const.pitRate, 2)"
      },
      {
        "path": "$.netMonthly",
        "expr": "$round(grossMonthly - social - pit, 2)"
      }
    ],
    "constraints": [],
    "metaDerivations": [],
    "viewDefinition": {
      "renderer": "builtin",
      "defaultView": "main",
      "views": [
        {
          "id": "main",
          "label": "Alga uz rokas",
          "layout": "vertical",
          "components": [
            {
              "id": "gross",
              "type": "numericField",
              "label": "Bruto alga / mēnesī (EUR)",
              "bind": "$.grossMonthly"
            },
            {
              "id": "tiles",
              "type": "group",
              "layout": "horizontal",
              "components": [
                {
                  "id": "netM",
                  "type": "statTile",
                  "label": "Uz rokas / mēnesī",
                  "bind": "$.netMonthly",
                  "format": "currency",
                  "currency": "EUR"
                }
              ]
            },
            {
              "id": "breakdown",
              "type": "keyValueList",
              "label": "Aprēķins",
              "items": [
                {
                  "label": "Bruto",
                  "bind": "$.grossMonthly",
                  "format": "currency",
                  "currency": "EUR"
                },
                {
                  "label": "VSAOI (10,5%)",
                  "bind": "$.social",
                  "format": "currency",
                  "currency": "EUR"
                },
                {
                  "label": "Ar nodokli apliekamā",
                  "bind": "$.taxBase",
                  "format": "currency",
                  "currency": "EUR"
                },
                {
                  "label": "IIN (25,5%)",
                  "bind": "$.pit",
                  "format": "currency",
                  "currency": "EUR"
                },
                {
                  "label": "Uz rokas",
                  "bind": "$.netMonthly",
                  "format": "currency",
                  "currency": "EUR"
                }
              ]
            },
            {
              "id": "note",
              "type": "staticText",
              "text": "'Latvija 2026: sociālā apdrošināšana 10,5%, IIN 25,5% no bruto atskaitot apdrošināšanu un neapliekamo minimumu 550 EUR. Aplēse, nav nodokļu konsultācija.'"
            },
            {
              "id": "sources",
              "type": "sourceList",
              "label": "Avoti",
              "items": [
                {
                  "label": "VID",
                  "url": "https://www.vid.gov.lv",
                  "date": "2026-08-02"
                }
              ]
            }
          ]
        }
      ]
    },
    "tests": [
      {
        "description": "S1 1,500 EUR",
        "given": {
          "$.grossMonthly": 1500
        },
        "expect": {
          "$.social": 157.5,
          "$.taxBase": 792.5,
          "$.pit": 202.09,
          "$.netMonthly": 1140.41
        }
      },
      {
        "description": "S3 10,000 EUR",
        "given": {
          "$.grossMonthly": 10000
        },
        "expect": {
          "$.social": 1050,
          "$.taxBase": 8400
        }
      }
    ]
  }
}
