This kit explains and helps you get the three programs that the Receita Federal released on GitHub in November 2026 up and running: the CBS calculator (the new federal tax), the IBS calculator (the state and municipal tax), and the Selective Tax calculator (the one applied to products such as alcoholic drinks and cigarettes), for businesses outside Simples; the Simples Nacional calculator; and the service invoice PDF generator (DANFSe). It’s for businesses, accountants, developers, and anyone curious. The kit includes official engine test: the same operation calculated in your system and in the tax agency’s program, side by side, with any difference identified. Ask your AI to read the kit and show you the result. If you don’t use AI, give the kit to your IT team or system provider. It’s not a tax agency product: it’s an INEMA kit built on top of its open-source code (see the sources).
Before and after Receita open the code
😟 Before
Calculating the new tax used to be a black box. You trusted the company’s system, which trusted the vendor, who read the law and technical notes and hoped they had understood them.
If it was wrong, you would only find out when the invoice was rejected or during an audit.
😌 Now
The program the Receita uses is open source, with a free license (MIT). Anyone can download it, run it on their own computer, and checks.
A difference of a few cents appears before issuing, along with the reason: the rate, the reduction, the law article, and the code that doesn’t match.
Stars and forks counted across the three repositories on 23/11/2026.
What each person earns
The same program works for four different people. Find yours.

🏢 Business (owner, finance, purchasing)
What you get: a way to check the invoicing system before 2027. If the company’s software calculates something different from the official engine, you find out now, not when you’re audited.
And more: simulate the price using the rate the Senate has yet to set.

📒 Accountant and accounting firm
What you get: an independent second opinion on the client’s system. Did it come out differently? The engine shows why: the product classification, the reduction, and the code that doesn’t match.
And more: a calculation details with the law article, ready for review or to explain to the client.

💻 Developer, ERP, invoice issuer
What you get: the reference for testing your own code. Same request, your program and the Federal Revenue Service's, and the difference reported down to the cent.
And more: the engine also generates and validates the tax section of the invoice XML and creates the service invoice PDF. You can embed it in your product (MIT), without using the Receita name.

🙋 Individual, student, curious person
What you get: see for yourself how consumption tax is calculated, item by item, in plain language: "base R$ 1.200, rate 8,8%, reduction 60%, Art. 129".
And more: change a tax rate and see its effect on the calculation.
How this changes your work
🧾 "Will the January invoice be correct?"
Today: you ask the system vendor, and they say "it’s already adapted".
With the kit: you take the company’s ten most common sales, run them through the official engine, and compare. Same: carry on. Different: take the evidence to the vendor.
📚 "Does this service get a reduction?"
Today: you look through the law and appendices, and you’re left unsure.
With the kit: the engine gives you the reduction and the article. In our test, an education service got a 60% reduction, and an example system that forgot the reduction charged more than twice as much.
💰 "How much will my price go up?"
Today: each news story gives a different number.
With the kit: you run the same sale at 8,8% and 11,3%, the two figures being considered, and see the difference in your case.
🔌 "Does our system need to recalculate?"
Today: the team writes everything from scratch based on the technical notes.
With the kit: the team connects the open-source engine as a test judge, and every new Receita version becomes an automated test.
Video in production
The explainer video for this kit is in production and will appear here when it’s published. In the meantime, the step-by-step instructions are below under "How to get started."
Three programs, without jargon
It isn’t a website for looking things up. They’re “engines”: programs that run on your computer and respond when another program sends a request.
🧮 Regular tax regime calculator
It is the official multiplication table of the new tax. You describe the sale (product, amount, city, date), and it returns the CBS, IBS, and Selective Tax for each item, with the calculation written out in Portuguese and the law article.
🏪 Simples Nacional calculator
The same idea for those under Simples. You enter the effective rate from the Simples calculation, and it calculates the CBS and IBS for each invoice item.
🖨️ DANFSe generator
É a printer for the service invoice. It receives the invoice file (XML) and returns the finished PDF, with a QR Code and receipt stub.
🔍 The official engine test
It’s the centerpiece of the kit. It works like checking a restaurant bill with your own calculator: you enter the same transaction in your system and in the Receita engine, and a table shows each item as "same" or "different," with the reason. You can also run the same sale with different rates and compare.
⚠️ What it is NOT
- It isn’t law. The Ordinance itself says the code has no regulatory effect. The company remains responsible for the tax.
- It isn’t supported by the Receita no promise of maintenance for the public, either.
- It doesn’t update itself in the company's system: someone needs to bring in each new version and test it.
- It doesn’t issue invoices. Calculates, checks the tax section, and generates the service invoice PDF.
- The Receita name doesn’t come with it: the license lets you use the code, but not the name or symbols to claim a product is official.
November brought changes the game
Checked on 23/11/2026. The rules are changing during the transition through 2033: open the official source before deciding.
- 10/11 · TCU recommends a CBS rate of 11.3%
The study went to the Senate, which sets the reference rate by 15/12. It isn’t the final rate yet. - 13/11 · Ordinance opens the three programs
Published in the Official Gazette with the verification codes for each initial version. MIT License, no support, and no force of law. - 16/11 · Receita announces the code on GitHub
Previously, you could download it from the CBS Platform, the tax agency’s website for the new tax. Now there’s a history, versions, and the public can report errors. - 17/11 · Fazenda cites an average effective rate of 8.5%
The Minister of Finance said this at a Senate hearing. It’s an average estimate, different from the benchmark rate. It doesn’t mean every price changes by 8.5%. - 19 and 20/11 · Both calculators have already received a new version
The regular-regime calculator fixed the rounding: before, the total might not match the sum of the items, and the invoice would be rejected. A difference of a few cents for those already integrated.
📌 For the business
Try the most common sales now. Run it again when the Senate publishes the tax rate.
📌 For the accountant
For Simples, in November and December, PGDAS-D (the monthly Simples tax filing) asks for the payroll for the previous 12 months for all activities. In 2027, filing will be based on the tax period.
📌 For the developer
Pin the engine version and record the date. Two versions have already been released in one week, and the repositories have a total of 35 open issues from the community.
Ask your AI run the test
You don't need to install anything manually or understand the files. The AI reads the kit, runs the calculator on your computer, and shows you the result in plain English.
1. Open your AI on your computer
Claude Code (from Claude) or Codex (from ChatGPT): assistants that work on your computer and come with their own paid subscription. Both have versions for Windows and Mac, and each one’s website explains how to install it. They open in a text window, but you just talk to them in plain English.
2. Paste the prompt below
It tells the AI to read the kit, check that the code is from the Receita, and run the example without changing anything on your system.
3. Read the table and decide
It shows the calculation item by item, with “match” or “mismatch.” For your sales, fill out the kit’s sample spreadsheet with what your system calculated (you can use Excel and save it as CSV), and the AI compares the results. For each sale, the spreadsheet asks for the product code (NCM) or service code (NBS), the tax status code (CST), the new tax classification (cClassTrib), the item’s tax base, and the CBS and IBS calculated by your system. You can find all of this in the invoice XML or in your invoicing system.
You don’t need to understand the text below: it’s for the AI. Copy and paste it.
Read the "calculadora-da-reforma" kit at https://github.com/inematds/calculadora-da-reforma (the README explains everything, including the technical setup). Then, on this computer: 1. Check that the Receita Federal code is the original (conferir-origem script) and tell me the result. 2. See if I have what is needed (Java 25; Go only for the service invoice PDF). If something is missing, explain what and wait for my yes before downloading anything. 3. Start the calculator and run the official example. Show me in plain English the tax on each item and why. 4. Explain how to fill in the template spreadsheet kit/exemplos/minhas-vendas.csv with my company's sales, and run the test with it. Do not change anything in my system or my files. Show me the plan and wait for me to say yes.
🌐 Just want to use it without installing anything?
The Receita Federal offers the same calculator on a website, with no login: open it in your browser, enter the sale, and see the CBS, IBS, and Selective Tax for each item. On 24/11/2026, the site was running version 1.7.2, the same as on GitHub.
What you enter there is sent to the Receita Federal website, and it's one sale at a time. The official engine test, which compares the entire spreadsheet with your system, runs on your computer.
⬇️ Where can I download the program?
Receita Federal doesn't publish a ready-to-install app: its GitHub releases contain only the code. That's why the prompt above tells the AI to download the code directly from Receita Federal and build the program on your computer, without you having to edit any files.
If you still want the files:
🤝 Don’t use AI on your computer?
Take this guide to your IT team or invoicing system provider. Ask them to run the official engine test with your most common sales and return the table showing “same” or “different” for each item, along with the date and calculator version. This becomes your record that you checked.
💻 Windows, Mac, or Linux?
The tax agency’s programs run on all three, and its repositories include commands for Windows. We tested only on Linux. The kit’s shortcuts are for Linux and Mac, so on Windows the AI may need an extra step: it follows the tax agency’s own Windows commands, and you can check the same table at the end.
Reminder: the result is a strong reference for checking, not the law. Responsibility for the tax remains with whoever issues the invoice.
🛠️ Is it technical, and do you prefer to do it by hand?
The commands, examples, pitfalls we found, and measurements are in the GitHub README.
The foundation is official; the kit is ours
The code belongs to the Federal Revenue Service and was developed with Serpro, the federal government’s technology company. The kit (explanations, scripts, and examples) is from INEMA, which is not affiliated with the Federal Revenue Service.
📜 The Ordinance
Cotec Ordinance No. 342, dated 12/11/2026: authorizes opening the three repositories, records the verification codes for each initial version, and states that the publication provides no support and has no force of law.
📰 The announcement
Receita explains why it made the code open: transparency, legal certainty, and an official component that can be connected to the systems companies already use.
💾 The three repositories
github.com/ReceitaFederalReceita Federal's official GitHub account
Regular tax regime · Simples Nacional · DANFSe Generator. Use only this address: a copy from somewhere else may have been altered.
We ran it for real: all three work, and the test catches the error
As of 23/11/2026, on a regular computer running Linux, with the latest versions.
- We checked the source.
The validation code for the three initial versions on GitHub is identical to the one in the Diário Oficial. - We deliberately put an error in an "example system".
It charged the school without the 60% reduction: R$ 105,60 in CBS. - The official engine test marked it "DIFFERENT".
The Receita engine returned R$ 42,24, with this explanation: “Rate reduced by 60%, Art. 129”. - And identified the incorrect entry.
An item with the product code (the NCM, which goes on the invoice) changed came back with the warning “NCM not linked” before it became an invoice.
The numbers, versions, and pitfalls we encountered along the way are in MEDICOES.md (in Portuguese).
Before you get started
Do I need to know how to code?
No. You paste in the request, and the AI does the rest. For your software vendor or IT team, the README has the commands.
Is this a Receita website for looking things up?
Not the kit: it runs the calculator on your computer, and the calculation isn't sent to Receita Federal or to us. Receita Federal also offers the same calculator on a website (the link is under "How to get started"); what you enter there is sent to them. Note: if you use AI (Claude Code or Codex), anything it reads, including the spreadsheet with sales, passes through its service. If it contains client data, use sample sales or remove names and CNPJ numbers first, or ask IT to run it without AI.
If the engine gives a value, can I use it on the invoice?
It’s a strong reference, but it isn’t law, and in 2027 the result is labeled “simulated” until the official rates are entered. Use it to check your calculations, and talk to your accountant.
How much does it cost?
The kit, this guide, and the tax agency’s code (MIT free license) are free. The easiest way uses Claude Code or Codex, which come with a paid Claude or ChatGPT subscription. Without AI, your IT team can run everything at no software cost.
Does it work for businesses under Simples?
Yes, there's a calculator just for Simples. It needs the effective tax rate, which comes from the monthly tax calculation (PGDAS-D).
Can I sell a product made with this?
The MIT license allows this. You just can’t use Receita’s name or symbols to suggest the product is official, and you’re responsible for the calculation.
And you: does your company’s system already calculate 2027 CBS, or are you still trusting it without checking? Free at inema.club, right on the web.

