{
  "$comment": "Machine-readable companion to https://valem.run/calculators/portugal/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/portugal/self-employed",
  "dataUrl": "https://valem.run/calculators/portugal/self-employed.json",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "Portugal regime simplificado model by Valem (https://valem.run/calculators/portugal/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/portugal/self-employed/verify",
  "country": "portugal",
  "countryName": "Portugal",
  "formula": "self-employed",
  "formulaName": "Regime simplificado",
  "title": "Recibos Verdes — Portugal Freelancer Tax",
  "answer": "Your net income as a Portuguese freelancer on the regime simplificado is revenue minus Social Security charged on 70% of it and IRS charged on 75% of it — both bases fixed by statute rather than by your actual costs.",
  "lang": "en",
  "currency": "EUR",
  "taxYear": "2026",
  "verification": {
    "claim": "shape-only",
    "statement": "The rates in this model are illustrative. Its 3 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": 3,
    "ratesAreIllustrative": true,
    "sourcesCheckedOn": "2026-08-22"
  },
  "sources": [
    {
      "label": "Segurança Social — Trabalhadores independentes: taxa de 21,4% sobre 70% dos rendimentos de prestação de serviços (2026)",
      "url": "https://www.seg-social.pt/trabalhadores-independentes",
      "checked": "2026-08-22"
    },
    {
      "label": "Autoridade Tributária — Regime simplificado, coeficiente de 0,75 (CIRS art. 31.º)",
      "url": "https://info.portaldasfinancas.gov.pt/pt/informacao_fiscal/codigos_tributarios/cirs_rep/Pages/irs31.aspx",
      "checked": "2026-08-22"
    },
    {
      "label": "Escalões de IRS 2026 — taxas marginais e limites (9 escalões)",
      "url": "https://www.especialistadoirs.pt/blog/escaloes-irs-2026-tabela-atualizada",
      "checked": "2026-08-22"
    }
  ],
  "terminalOutput": "netIncome",
  "inputs": [
    {
      "name": "annualRevenue",
      "type": "number",
      "label": "Annual revenue (EUR)",
      "minimum": 0
    }
  ],
  "outputs": [
    {
      "name": "ssBase",
      "type": "number",
      "formula": "$round($min([annualRevenue * $const.ssIncomeShare, $const.ssAnnualBaseCeiling]), 2)"
    },
    {
      "name": "socialSecurity",
      "type": "number",
      "label": "Social Security (21.4% of 70%)",
      "format": "number",
      "formula": "$round(ssBase * $const.ssRate, 2)"
    },
    {
      "name": "taxableBase",
      "type": "number",
      "label": "IRS taxable base (75%)",
      "format": "number",
      "formula": "$round(annualRevenue * $const.serviceCoefficient, 2)"
    },
    {
      "name": "irsTax",
      "type": "number",
      "label": "IRS",
      "format": "number",
      "formula": "($t := taxableBase; $round((($t < 8342 ? $t : 8342) * 0.125) + (($t > 8342 ? (($t < 12587 ? $t : 12587) - 8342) : 0) * 0.157) + (($t > 12587 ? (($t < 17838 ? $t : 17838) - 12587) : 0) * 0.212) + (($t > 17838 ? (($t < 23089 ? $t : 23089) - 17838) : 0) * 0.241) + (($t > 23089 ? (($t < 29397 ? $t : 29397) - 23089) : 0) * 0.311) + (($t > 29397 ? (($t < 43090 ? $t : 43090) - 29397) : 0) * 0.349) + (($t > 43090 ? (($t < 46566 ? $t : 46566) - 43090) : 0) * 0.431) + (($t > 46566 ? (($t < 86634 ? $t : 86634) - 46566) : 0) * 0.446) + (($t > 86634 ? ($t - 86634) : 0) * 0.48), 2))"
    },
    {
      "name": "netIncome",
      "type": "number",
      "label": "Net income / year",
      "format": "number",
      "formula": "$round($max([0, annualRevenue - socialSecurity - irsTax]), 2)"
    }
  ],
  "testCases": [
    {
      "description": "30,000 EUR revenue — a typical full-time freelancer",
      "given": {
        "annualRevenue": 30000
      },
      "expect": {
        "ssBase": 21000,
        "socialSecurity": 4494,
        "taxableBase": 22500,
        "irsTax": 3945.97,
        "netIncome": 21560.03
      }
    },
    {
      "description": "60,000 EUR revenue — into the 43.1% band",
      "given": {
        "annualRevenue": 60000
      },
      "expect": {
        "ssBase": 42000,
        "socialSecurity": 8988,
        "taxableBase": 45000,
        "irsTax": 11651.77,
        "netIncome": 39360.23
      }
    },
    {
      "description": "150,000 EUR revenue — Social Security stops at the base ceiling",
      "given": {
        "annualRevenue": 150000
      },
      "expect": {
        "ssBase": 77346.72,
        "socialSecurity": 16552.2
      }
    }
  ],
  "spec": {
    "id": "self-employed-portugal",
    "version": "1.0.0",
    "schema": {
      "type": "object",
      "properties": {
        "annualRevenue": {
          "type": "number",
          "minimum": 0
        },
        "ssBase": {
          "type": "number",
          "readOnly": true
        },
        "socialSecurity": {
          "type": "number",
          "readOnly": true
        },
        "taxableBase": {
          "type": "number",
          "readOnly": true
        },
        "irsTax": {
          "type": "number",
          "readOnly": true
        },
        "netIncome": {
          "type": "number",
          "readOnly": true
        }
      },
      "required": [
        "annualRevenue"
      ]
    },
    "constants": {
      "ssIncomeShare": 0.7,
      "ssRate": 0.214,
      "ssAnnualBaseCeiling": 77346.72,
      "serviceCoefficient": 0.75
    },
    "defaultValues": [
      {
        "path": "$",
        "expr": "{ \"annualRevenue\": 30000 }"
      }
    ],
    "derivations": [
      {
        "path": "$.ssBase",
        "expr": "$round($min([annualRevenue * $const.ssIncomeShare, $const.ssAnnualBaseCeiling]), 2)"
      },
      {
        "path": "$.socialSecurity",
        "expr": "$round(ssBase * $const.ssRate, 2)"
      },
      {
        "path": "$.taxableBase",
        "expr": "$round(annualRevenue * $const.serviceCoefficient, 2)"
      },
      {
        "path": "$.irsTax",
        "expr": "($t := taxableBase; $round((($t < 8342 ? $t : 8342) * 0.125) + (($t > 8342 ? (($t < 12587 ? $t : 12587) - 8342) : 0) * 0.157) + (($t > 12587 ? (($t < 17838 ? $t : 17838) - 12587) : 0) * 0.212) + (($t > 17838 ? (($t < 23089 ? $t : 23089) - 17838) : 0) * 0.241) + (($t > 23089 ? (($t < 29397 ? $t : 29397) - 23089) : 0) * 0.311) + (($t > 29397 ? (($t < 43090 ? $t : 43090) - 29397) : 0) * 0.349) + (($t > 43090 ? (($t < 46566 ? $t : 46566) - 43090) : 0) * 0.431) + (($t > 46566 ? (($t < 86634 ? $t : 86634) - 46566) : 0) * 0.446) + (($t > 86634 ? ($t - 86634) : 0) * 0.48), 2))"
      },
      {
        "path": "$.netIncome",
        "expr": "$round($max([0, annualRevenue - socialSecurity - irsTax]), 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": "What this model leaves out",
              "text": "'The two statutory coefficients and the 2026 IRS schedule are the official ones. What is missing is everything personal: no household quotient, no dependants, no personal tax credits, and no deduction for the Social Security actually paid. It also omits the rule that part of the 25% presumed expense is clawed back when documented expenses fall short of 15% of gross revenue, the first-12-months Social Security exemption for newly registered activity, and the 20 EUR monthly contribution floor. The regime applies to service revenue up to 200,000 EUR a year. Not tax advice.'"
            },
            {
              "id": "revenueField",
              "type": "numericField",
              "label": "Annual revenue (EUR)",
              "bind": "$.annualRevenue",
              "placeholder": "30000"
            },
            {
              "id": "tiles",
              "type": "group",
              "layout": "horizontal",
              "components": [
                {
                  "id": "netTile",
                  "type": "statTile",
                  "label": "Net income / year",
                  "bind": "$.netIncome",
                  "format": "number"
                },
                {
                  "id": "ssTile",
                  "type": "statTile",
                  "label": "Social Security (21.4% of 70%)",
                  "bind": "$.socialSecurity",
                  "format": "number"
                },
                {
                  "id": "baseTile",
                  "type": "statTile",
                  "label": "IRS taxable base (75%)",
                  "bind": "$.taxableBase",
                  "format": "number"
                },
                {
                  "id": "irsTile",
                  "type": "statTile",
                  "label": "IRS",
                  "bind": "$.irsTax",
                  "format": "number"
                }
              ]
            },
            {
              "id": "sources",
              "type": "sourceList",
              "label": "Sources",
              "items": [
                {
                  "label": "Segurança Social — Trabalhadores independentes: taxa de 21,4% sobre 70% dos rendimentos de prestação de serviços (2026)",
                  "url": "https://www.seg-social.pt/trabalhadores-independentes",
                  "date": "2026-08-22"
                },
                {
                  "label": "Autoridade Tributária — Regime simplificado, coeficiente de 0,75 (CIRS art. 31.º)",
                  "url": "https://info.portaldasfinancas.gov.pt/pt/informacao_fiscal/codigos_tributarios/cirs_rep/Pages/irs31.aspx",
                  "date": "2026-08-22"
                },
                {
                  "label": "Escalões de IRS 2026 — taxas marginais e limites (9 escalões)",
                  "url": "https://www.especialistadoirs.pt/blog/escaloes-irs-2026-tabela-atualizada",
                  "date": "2026-08-22"
                }
              ]
            }
          ]
        }
      ]
    },
    "tests": [
      {
        "description": "30,000 EUR revenue — a typical full-time freelancer",
        "given": {
          "$.annualRevenue": 30000
        },
        "expect": {
          "$.ssBase": 21000,
          "$.socialSecurity": 4494,
          "$.taxableBase": 22500,
          "$.irsTax": 3945.97,
          "$.netIncome": 21560.03
        }
      },
      {
        "description": "60,000 EUR revenue — into the 43.1% band",
        "given": {
          "$.annualRevenue": 60000
        },
        "expect": {
          "$.ssBase": 42000,
          "$.socialSecurity": 8988,
          "$.taxableBase": 45000,
          "$.irsTax": 11651.77,
          "$.netIncome": 39360.23
        }
      },
      {
        "description": "150,000 EUR revenue — Social Security stops at the base ceiling",
        "given": {
          "$.annualRevenue": 150000
        },
        "expect": {
          "$.ssBase": 77346.72,
          "$.socialSecurity": 16552.2
        }
      }
    ]
  }
}
