Brazil's tax authority open-sources its Tax Calculator on GitHub under the MIT license

Brazil's Receita Federal has published on GitHub the source code of the Tax Calculator, the tool that applies the rules of the Consumption Tax Reform. The announcement was made on Monday (November 16), and it is the first time the agency has officially made a software project available in a public collaborative development environment, under the MIT license. The authorization came in Portaria Cotec No. 342, of November 12, 2026, published in the Diário Oficial da União on November 13.

The calculator embodies the calculation rules for the CBS (Contribution on Goods and Services), the IBS (Tax on Goods and Services) and the Selective Tax, the new consumption taxes created by the Tax Reform (Complementary Law No. 214, of January 16, 2025).

Three public repositories

There are three repositories in the ReceitaFederal organization on GitHub: the Calculadora RTC – Regime Regular, a REST API that calculates CBS, IBS and the Selective Tax, consults the official tables, and generates and validates the taxation groups of electronic tax documents; the Calculadora RTC – Simples Nacional, with the calculation logic for companies under the Simples Nacional regime; and the Calculadora RTC – Gerador DANFSe, which generates and validates electronic tax documents under the new rules.

What changes in practice

With the code open, companies, developers and software vendors can embed exactly the same logic used by the tax administration into their billing, management and compliance systems, with calculation history and legal basis built in. The ordinance records the hashes of the initially published versions, which makes it possible to verify the authenticity and integrity of the code. The project is the result of joint work between the Receita Federal and Serpro.

Context

The calculator's code could already be downloaded from the CBS Platform since 2025. What is new is the publication on GitHub, with version history and the MIT license — the license allows use, copying and modification, including in commercial products, as long as the license notice accompanies the code. The initiative is aligned with the Tax Administration 3.0 concept, advocated by the OECD, in which tax compliance happens directly inside the systems taxpayers already use. Effective CBS collection starts in 2027; during 2026, the environment is for simulations and technical validations, with no real charges.

Sources

Featured image: logo of the Receita Federal do Brasil, via Wikimedia Commons (file “Logo Receita Federal do Brasil.svg”, public domain).

Transparency: this article was produced with the assistance of artificial intelligence, based on cross-checking public posts on X and sources from the internet. Please consult the original sources to confirm the information.

By Muse