NEWS

Receita Federal publishes Tax Reform's tax calculator on GitHub under MIT license

Receita Federal publishes Tax Reform's tax calculator on GitHub under MIT license
Image: Redação iMasters
News
Reading
5 min
In short

Cotec Ordinance No. 342 authorizes the public release of the source code for the Tax Reform's Tax Calculator, under the MIT license and with verification hashes. It is the first software project that Receita Federal has officially published in a collaborative development environment.

Receita Federal, Brazil's federal tax authority, published the source code for its Tax Calculator in public repositories on GitHub on November 16, 2026. The authorization came through Cotec Ordinance No. 342, dated November 12, 2026, published in the Diário Oficial da União (Brazil's official gazette) on November 13. It is the first time the agency has officially released a software project in a public collaborative development environment, and the license chosen was MIT, one of the most permissive and widely used licenses in the open-source world.

The tool is not new: according to Receita Federal itself, the code had already been available for download on the Plataforma CBS since 2025. What changes now is the channel. Moving the project to GitHub puts the calculator in the environment where most Brazilian developers already work every day, with commit history, releases, and the ability to continuously track changes.

What the calculator does, in practice

The Tax Calculator implements the calculation rules for CBS, the new federal consumption tax created by the reform, and the other taxes under the Consumption Tax Reform, which replace Brazil's PIS and Cofins taxes under the new model. Receita Federal published three separate repositories, each with a specific scope:

  • ReceitaFederal/calculadora-rtc-regime-regular, for companies under the regular assessment regime;
  • ReceitaFederal/calculadora-rtc-simples-nacional, aimed at the specific rules of Simples Nacional, Brazil's simplified tax regime for small businesses;
  • ReceitaFederal/calculadora-rtc-gerador-danfse, for generating the auxiliary document for the electronic service invoice (DANFSe).

This separation is already a sign of how Receita Federal is modeling the problem: it is not a generic tax calculation library, but three components with different boundaries of responsibility, designed to be plugged into existing billing and management systems.

What changes for developers

For those who build or maintain billing systems, ERPs, or tax middleware, the concrete change is being able to incorporate exactly the same calculation logic used by the tax administration, instead of reimplementing it from reading the legislation. This reduces a specific type of risk: the divergence between what the company's system calculates and what Receita Federal expects to receive.

In practice, this means less rework on tax validations and less time spent reconciling interpretations of rules that change during the reform's transition period, which runs until 2033. For those who already deal with the complexity of special regimes, reduced rates, and sector-specific exceptions in Brazilian tax legislation, having the official calculation as a code reference is different from having only the written rule.

The Ordinance also records the hashes of the initial versions of each repository. This gives anyone integrating the calculator a way to verify the integrity and authenticity of the downloaded code, something relevant in a scenario where forks and unofficial copies tend to appear quickly for any popular project on GitHub.

MIT license: what it allows and what it doesn't solve

The MIT license allows commercial use, modification, distribution, and private use of the code, with few restrictions beyond keeping the copyright notice and the license itself in any copies. This means a software house can incorporate the calculator into a closed product without any obligation to open the source code of the final product, an important distinction compared to copyleft licenses such as the GPL.

What the license does not solve is the maintenance model. Publishing on GitHub makes it easier to follow releases and integrate updates into a CI/CD pipeline, but Receita Federal did not detail, in the material released, whether the repository accepts external contributions via pull request or whether it works only as a distribution channel for versions produced internally together with Serpro, Brazil's state-owned IT company, the project's technical partner for the agency.

This is a practically relevant difference for anyone thinking about contributing: a repository that only publishes official releases calls for an integration strategy (tracking tags, reviewing the changelog, testing before updating in production) different from that of a project that accepts active community collaboration.

The context: Tax Administration 3.0

Receita Federal frames the initiative within the concept of Tax Administration 3.0, advocated by the OECD, in which tax compliance happens directly within the systems used by taxpayers themselves, instead of depending only on after-the-fact filings. Publishing the calculation code as a reusable component is a step in that direction: the tax business rule stops being just legal text and also becomes an auditable software artifact.

For the tax tools ecosystem in Brazil, this opens up concrete room: third-party libraries that wrap the official calculator with usability layers, connectors for specific ERPs, or validation services that run the official logic as a cross-check before issuing tax documents. None of these layers needs to reinvent the calculation core, only integrate it.

What remains open

The material released by Receita Federal does not detail the cadence of releases, the semantic versioning process (if one exists), or how changes to rates or rules during the reform's transition will be propagated to those who have already integrated the calculator. There is also, so far, no public indication of an issues policy or roadmap in the repositories themselves.

For anyone evaluating adoption now, the reasonable path is to treat the three repositories as a critical external dependency: pin the version in use, review the commit history before updating in production, and check the hashes listed in Cotec Ordinance No. 342 when downloading an initial version, since that is the formal integrity guarantee that Receita Federal itself documented along with the publication.

Translated from the Brazilian Portuguese original · Read the original