{
  "$comment": "Machine-readable companion to https://valem.run/calculators/brazil/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/brazil/self-employed",
  "dataUrl": "https://valem.run/calculators/brazil/self-employed.json",
  "license": {
    "name": "CC BY 4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "Brazil mei model by Valem (https://valem.run/calculators/brazil/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/brazil/self-employed/verify",
  "country": "brazil",
  "countryName": "Brazil",
  "formula": "self-employed",
  "formulaName": "MEI",
  "title": "MEI — Brazil Microentrepreneur Tax",
  "answer": "Your net income as a Brazilian MEI is revenue minus a fixed monthly DAS of about 86 BRL for services — an amount that does not change with what you earn, up to the 81,000 BRL annual ceiling.",
  "lang": "en",
  "currency": "BRL",
  "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": "Portal do Empreendedor / Receita Federal — Simples Nacional: MEI",
      "url": "https://www8.receita.fazenda.gov.br/SimplesNacional/",
      "checked": "2026-08-22"
    },
    {
      "label": "Tabela MEI 2026: limite de faturamento e valores do DAS",
      "url": "https://www.balancinho.com.br/tabela-mei",
      "checked": "2026-08-22"
    }
  ],
  "terminalOutput": "netIncome",
  "inputs": [
    {
      "name": "annualRevenue",
      "type": "number",
      "label": "Annual revenue (BRL)",
      "minimum": 0
    }
  ],
  "outputs": [
    {
      "name": "annualDas",
      "type": "number",
      "label": "DAS / year",
      "format": "number",
      "formula": "$round($const.monthlyDas * 12, 2)"
    },
    {
      "name": "effectiveRatePercent",
      "type": "number",
      "label": "Effective rate (%)",
      "format": "number",
      "formula": "annualRevenue > 0 ? $round(annualDas / annualRevenue * 100, 2) : 0"
    },
    {
      "name": "netIncome",
      "type": "number",
      "label": "Net income / year",
      "format": "number",
      "formula": "$round($max([0, annualRevenue - annualDas]), 2)"
    }
  ],
  "testCases": [
    {
      "description": "60,000 BRL revenue — a typical full-time MEI",
      "given": {
        "annualRevenue": 60000
      },
      "expect": {
        "annualDas": 1032.6,
        "effectiveRatePercent": 1.72,
        "netIncome": 58967.4
      }
    },
    {
      "description": "20,000 BRL revenue — the same DAS on a third of the revenue",
      "given": {
        "annualRevenue": 20000
      },
      "expect": {
        "annualDas": 1032.6,
        "effectiveRatePercent": 5.16,
        "netIncome": 18967.4
      }
    },
    {
      "description": "81,000 BRL revenue — at the ceiling of the regime",
      "given": {
        "annualRevenue": 81000
      },
      "expect": {
        "annualDas": 1032.6,
        "effectiveRatePercent": 1.27,
        "netIncome": 79967.4
      }
    }
  ],
  "spec": {
    "id": "self-employed-brazil",
    "version": "1.0.0",
    "schema": {
      "type": "object",
      "properties": {
        "annualRevenue": {
          "type": "number",
          "minimum": 0
        },
        "annualDas": {
          "type": "number",
          "readOnly": true
        },
        "effectiveRatePercent": {
          "type": "number",
          "readOnly": true
        },
        "netIncome": {
          "type": "number",
          "readOnly": true
        }
      },
      "required": [
        "annualRevenue"
      ]
    },
    "constants": {
      "monthlyDas": 86.05,
      "annualCap": 81000
    },
    "defaultValues": [
      {
        "path": "$",
        "expr": "{ \"annualRevenue\": 60000 }"
      }
    ],
    "derivations": [
      {
        "path": "$.annualDas",
        "expr": "$round($const.monthlyDas * 12, 2)"
      },
      {
        "path": "$.effectiveRatePercent",
        "expr": "annualRevenue > 0 ? $round(annualDas / annualRevenue * 100, 2) : 0"
      },
      {
        "path": "$.netIncome",
        "expr": "$round($max([0, annualRevenue - annualDas]), 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 DAS modelled here is the 86.05 BRL a month a MEI providing services pays in 2026 — 5% of the minimum wage as INSS plus 5.00 BRL of ISS. Commerce or industry pays 82.05 (INSS plus ICMS) and a mixed activity 87.05. The amount does not move with revenue at all, which is why the effective rate collapses as revenue rises and why the tile above shows it. The regime stops at 81,000 BRL of annual revenue; exceeding it by up to 20% keeps you in for the rest of the year with a supplementary DAS on the excess, and beyond that you leave MEI entirely. Not tax advice.'"
            },
            {
              "id": "inputField",
              "type": "numericField",
              "label": "Annual revenue (BRL)",
              "bind": "$.annualRevenue",
              "placeholder": "60000"
            },
            {
              "id": "tiles",
              "type": "group",
              "layout": "horizontal",
              "components": [
                {
                  "id": "netIncomeTile",
                  "type": "statTile",
                  "label": "Net income / year",
                  "bind": "$.netIncome",
                  "format": "number"
                },
                {
                  "id": "annualDasTile",
                  "type": "statTile",
                  "label": "DAS / year",
                  "bind": "$.annualDas",
                  "format": "number"
                },
                {
                  "id": "effectiveRatePercentTile",
                  "type": "statTile",
                  "label": "Effective rate (%)",
                  "bind": "$.effectiveRatePercent",
                  "format": "number"
                }
              ]
            },
            {
              "id": "sources",
              "type": "sourceList",
              "label": "Sources",
              "items": [
                {
                  "label": "Portal do Empreendedor / Receita Federal — Simples Nacional: MEI",
                  "url": "https://www8.receita.fazenda.gov.br/SimplesNacional/",
                  "date": "2026-08-22"
                },
                {
                  "label": "Tabela MEI 2026: limite de faturamento e valores do DAS",
                  "url": "https://www.balancinho.com.br/tabela-mei",
                  "date": "2026-08-22"
                }
              ]
            }
          ]
        }
      ]
    },
    "tests": [
      {
        "description": "60,000 BRL revenue — a typical full-time MEI",
        "given": {
          "$.annualRevenue": 60000
        },
        "expect": {
          "$.annualDas": 1032.6,
          "$.effectiveRatePercent": 1.72,
          "$.netIncome": 58967.4
        }
      },
      {
        "description": "20,000 BRL revenue — the same DAS on a third of the revenue",
        "given": {
          "$.annualRevenue": 20000
        },
        "expect": {
          "$.annualDas": 1032.6,
          "$.effectiveRatePercent": 5.16,
          "$.netIncome": 18967.4
        }
      },
      {
        "description": "81,000 BRL revenue — at the ceiling of the regime",
        "given": {
          "$.annualRevenue": 81000
        },
        "expect": {
          "$.annualDas": 1032.6,
          "$.effectiveRatePercent": 1.27,
          "$.netIncome": 79967.4
        }
      }
    ]
  }
}
