Federal Revenue Service logoSource: Brazil's Federal Revenue Service (in Portuguese) · content by INEMA, unofficial
Explained

How much of your money goes to the new tax? Brazil's Federal Revenue Service has opened the calculator

CBS, the federal tax that replaces PIS and Cofins and is included in the price of what you buy, begins in January 2027. In November, Brazil's Federal Revenue Service made the official calculation program public on GitHub (the site where code is stored). We ran the same purchase through it: the result was R$ 56.76 at the example test rate of 8.8%, and R$ 72.88 at 11.3%, the rate recommended by the TCU (Federal Court of Accounts) and still to be voted on by the Senate. To check your sales, we put together the free Open Calculator kit.

The new tax math is open: the same purchase costs R$ 56.76 or R$ 72.88 in new tax

Official source: "Brazil's Federal Revenue Service publishes its first open-source code on GitHub (in Portuguese)", news article dated 11/16/2026.The logo is shown only to identify where the news came from. This page is by INEMA: it is not affiliated with the Federal Revenue Service, which has not reviewed or endorsed it.

In a nutshell

Brazil's Federal Revenue Service has made public the program that calculates the new taxes under the tax reform: CBS (federal, replacing PIS and Cofins), IBS (for states and municipalities), and the Selective Tax (which applies to beverages, cigarettes, and other products). The program has been available for download through the CBS Platform since 2025; the November news is that it was published on GitHub, where every version and fix is visible to everyone, and anyone can run it and check the results. This page explains what happened in November, shows the same purchase calculated with the rate in the Federal Revenue Service's example (8.8%, just a test figure) and the rate recommended by the TCU (11.3%, not yet voted on), and explains what this means for you. Just read on; if you want to run the calculation, find out how at "Check for yourself".

Brazil opened the new tax math: the two bills, November timeline, buyers, sellers, accountants, check it yourself
The two calculations

The same purchase, R$ 16.12 apart

We took the example published by the Federal Revenue Service in the program documentation and ran it twice, changing just one number: the CBS rate.

The same purchase, two calculations of the new tax: CBS of R$ 56.76 at 8.8% and R$ 72.88 at 11.3%, recommended by the TCU and not yet approved

🧾 Calculation A: CBS at 8.8% → R$ 56.76

This is the rate used by the Federal Revenue Service in its documentation example. It is for testing the program; it is not a proposed rate. The total matches the figure in the official documentation.

🧾 Calculation B: CBS at 11.3% → R$ 72.88

This is the reference rate the TCU (Federal Court of Accounts) calculated for 2027 and submitted to the Senate. It has not yet been approved. At this rate, CBS on the same purchase rises by 28%.

🔎 What the calculation shows, item by item

  • Basic food basket rice (R$ 100): zero CBS in both calculations. The law provides a 100% reduction for the basic food basket, so the rate does not matter.
  • Beer (R$ 150): the Selective Tax is applied first (R$ 15), then CBS is calculated on R$ 165. The result is R$ 14.52 or R$ 18.64.
  • School tuition (R$ 1,200): education gets a 60% rate reduction. The result is R$ 42.24 or R$ 54.24. The program explains the reason in Portuguese and cites the law (Art. 129).
  • Meat with the wrong product code: the program does not calculate it and warns that the code does not match the classification. This kind of error can lead to an invoice being rejected; in a direct calculation, an item like this makes the program reject the entire purchase.

The purchase total is R$ 1,465.00. Both calculations also show R$ 0.64 in IBS, which in 2027 is just a 0.1% test. Run on 11/23/2026 with version 1.7.2 of the Federal Revenue Service's program.

January example

A real grocery receipt, what it looks like in January

A purchase of R$ 1,512.15 at a supermarket in RS, on 11/06/2026: 121 items. We ran each line of the receipt through Brazil's Federal Revenue program, as if the purchase were made in January 2027, when CBS begins.

Today's receipt, R$ 1,512.15, and the same purchase in January 2027: basic food basket with zero CBS, items with a 60% reduction, and items at the full rate; total CBS of R$ 89.14 at 8.8% or R$ 114.30 at 11.3%

🧾 CBS at 8.8% → R$ 89.14

Using the example's test rate from the Federal Revenue. That's 5.9% of the purchase total.

🧾 CBS at 11.3% → R$ 114.30

Using the rate recommended by the TCU, not yet approved. That's 7.6% of the purchase total. The difference between the two is R$ 25.16.

🔎 What the calculation shows, product by product

  • Basic food basket items have zero CBS: chicken, milk, coffee, sugar, salt, wheat flour, and sagu, totaling R$ 396.04 on the receipt. The program states the reason: zero rate, article 125 of the law.
  • Some foods get a 60% rate reduction: soybean oil, dairy drink, yogurt, and cornstarch (R$ 173.74). The 19 bottles of soybean oil (R$ 132.81) incur R$ 4.67 in CBS at 8.8%, not R$ 11.69.
  • Non-basic items add up: the 81 cans of condensed milk (R$ 404.19) alone incur R$ 35.57 or R$ 45.67 in CBS, and the 81 cartons of cream, R$ 17.75 or R$ 22.79. Gelatin, sauces, mayonnaise, and chocolate drink mix also pay the full rate.
  • The canned-food catch: canned corn and peas and shoestring potatoes may look like "vegetables," but the law's reduction applies only to cooked vegetables with no salt or other ingredients. Canned vegetables contain salt, so they fall under the full rate.

CBS isn't added on top of today's price: it replaces PIS and Cofins, which are already included in the R$ 1,512.15. The calculation shows how much of the purchase becomes CBS, with each tax named item by item.

The receipt doesn't include the products' tax code (NCM): INEMA selected a code for each one and checked its classification in the program's own table. We assumed a supermarket under the standard tax regime (the calculation is different under Simples Nacional) and used the value of each receipt line as the tax base. Both calculations also show R$ 0.70 in IBS, the 0.1% test rate for 2027. This is a simulation, not a tax receipt. Run on 11/24/2026, using version 1.7.2 of the Federal Revenue program; the program input and response are in the kit, at kit/exemplos.

Price and accounting

What changes in the price, and the work of figuring it out

The same grocery receipt from the example above shows two things: where prices may change and where the accountant will spend time.

Price timeline: in 2027, PIS and Cofins end and CBS takes effect; from 2029 to 2032, ICMS decreases and IBS increases; in 2033, the new system is fully in place; and the 3 pitfalls found on the receipt: discontinued chicken code, preserved vegetables without the reduction because of the salt, and garlic bread that is not part of the basic food basket

🛒 What may change in prices, and when

  • January 2027: PIS and Cofins end, and CBS takes their place. This is not an additional tax on top of the price; one tax is being replaced by another.
  • The basic food basket is likely to stay the same: on the receipt, R$ 396.04 worth of purchases had zero CBS. Many of these products already do not pay PIS and Cofins today.
  • The rest depends on the rate: the Senate's rate will only be announced by 12/15. If it is similar to what people pay today, prices will change little. If it is higher, prices will rise on full-rate items, such as the condensed milk and cream on the receipt.
  • From 2029 to 2032: ICMS gradually decreases and IBS gradually increases. The bigger price change comes gradually, until the new system is fully in place in 2033.
  • And the store's margin? The tax the store pays on purchases comes back as a credit. If the store calculates its margin on a cost that includes the tax, it charges a margin on the tax and the price rises for no reason. The right approach is to calculate the margin on the cost without tax and add CBS at the end.

🧮 For accountants: what is easy and what takes work

  • Easy—the calculation: the receipt system calculates CBS item by item and gives the reason along with the relevant article of law. The 121 items on this receipt ran through Brazil's Federal Revenue program in less than a second.
  • Easy—checking: the accountant runs the client's sales through the Federal Revenue's public program and checks whether the store's system calculated the same amounts.
  • Time-consuming—classifying each product: three pitfalls showed up on this receipt alone. The chicken code we first used will no longer exist in 2027. Canned corn and peas seem to qualify for the reduction, but they do not because of the salt. Garlic bread and gelatin fall under codes linked to the basic food basket, but the rule applies only to French bread and infant formula. A grocery store has thousands of products.
  • Time-consuming—the transition: from 2027 to 2032, CBS, ICMS, and IBS will coexist, with IBS gradually increasing. That means two calculation methods at the same time.
  • Time-consuming—Simples Nacional: a Simples Nacional client can pay CBS and IBS within Simples Nacional or separately. Paying separately may be worthwhile for businesses that sell to other companies, which can use the credit. It is a calculation for each client.

In short: 2026 and 2027 will take a lot of work, especially getting product records right. After that, there will be just one rule, with broad credits, and day-to-day work should be simpler than with today's PIS and Cofins. The kit's spreadsheet test shows, item by item, where the store's system calculated a different amount from the Federal Revenue program.

The three pitfalls came from the receipt in the example above, run on 11/24/2026 with version 1.7.2 of the Federal Revenue program. What may happen to prices is an interpretation of the law's rules, not a forecast: each store sets its own prices.

What's happening

November 2026, in order

The tax reform (Complementary Law 214/2025) gradually replaces five consumption taxes with three new ones through 2033. The first major step comes in January. Checked on 11/24/2026.

  1. 11/09 · Federal Revenue Service opens CBS reporting channels
    The channels through which companies' systems will submit debits and credits for the new tax.
  2. 11/10 · The TCU submits the 11.3% rate to the Senate
    The detailed calculation came to 11.3468%. This is the reference rate: the figure that keeps the new revenue equal to what PIS and Cofins bring in. The Senate sets it by resolution, by December 15.
  3. 11/12 and 11/13 · Ordinance authorizes the code release
    Ordinance Cotec No. 342 appears in the Official Gazette: it releases three programs under the MIT License, records each version's "fingerprint," and states that there is no support and the code has no force of law.
  4. 11/16 · Federal Revenue Service announces open-source code on GitHub
    GitHub is the site where programmers store and share code. Now anyone can see the versions and history, and report errors.
  5. 11/17 · The Finance Ministry cites an 8.5% average effective rate
    That is a different figure: the average actually paid after reductions. It does not mean every price changes by 8.5%.
  6. 11/18 · The Senate asks the TCU for its methodology
    The Economic Affairs Committee approved a request to see the studies behind the 11.3% rate.
  7. 11/18 to 11/20 · Both calculators receive new versions
    The regular-regime calculator (version 1.7.2) fixed rounding: before, the invoice total could differ from the sum of its items. The Simples Nacional calculator was released in version 1.0.2. This shows that the code is being corrected in public.
  8. By 12/15 · The Senate decides the rate
    Once decided, Calculation B (or another one) will no longer be a simulation.
  9. January 2027 · CBS begins
    It replaces PIS and Cofins. IBS only comes in as a 0.1% test, and the Selective Tax takes effect.
For you

What this means for your wallet and your work

Woman at a supermarket checkout checks her receipt

🛒 Shoppers

CBS is not an extra tax added on top of everything: it replaces PIS and Cofins, which are already included in prices today. What changes is the amount, which depends on the rate set by the Senate and on each product's reductions, such as those for rice and education in the calculations above.

Owner of a neighborhood shop compares two values on a laptop

🏢 Sellers and business owners

Your invoicing system needs to calculate correctly starting in January. Now you can check: run the same sale through your system and the Federal Revenue Service's program, then see whether the figures match.

Accountant compares a printed report with the computer screen

📒 Accountants

An independent second opinion alongside the client's system, with the reason and the relevant article of law spelled out. Useful for an expert opinion and for explaining to clients why the calculation came out that way.

And a warning before rejection: the "blocked" meat in the calculations above has a product code (NCM) that does not match its tax classification—the same error that would cause the invoice to be rejected.

Developer checks a table of numbers next to the code

💻 Software developers

The official reference for testing your own code. You can use the MIT License, but you cannot use the Federal Revenue Service's name to claim that your product is official.

Check for yourself

Want to run the calculation on your sales?

Two options: the Federal Revenue Service's online calculator, for one sale at a time with no installation; and the free Open Calculator kit, for comparing many sales with your system, with help from AI on your computer (Claude Code or Codex) or your IT team.

🌐 No installation: the Federal Revenue Service's online calculator

The Federal Revenue Service hosts the same calculator on a website, with no login required. As of 11/24/2026, it was running version 1.7.2, the same as the open-source code. You can calculate one sale at a time, and the information you enter goes to the Federal Revenue Service's website.

Open the Federal Revenue Service's online calculator (in Portuguese)

Open Calculator: check whether your system calculates CBS and IBS correctly

🧮 Open Calculator: test the official engine

The guide explains in plain English how to ask AI to install the calculator, run both calculations, and compare them item by item with your system, marking each one as "same" or "different."

You can also share it with your IT team or invoicing system provider.

Open the Open Calculator guide

Sources

Where each piece of information comes from

The code is from Brazil's Federal Revenue Service, developed with Serpro, the federal government's technology company. The explanations and calculations on this page are by INEMA, which is not affiliated with the Federal Revenue Service.

📰 The Federal Revenue Service announcement

Why it was released: transparency, legal certainty, and an official component that companies can connect to their systems.

Federal Revenue Service news (11/16) (in Portuguese)

📜 The Ordinance

Ordinance Cotec No. 342, dated 11/12/2026: authorizes the release of the three programs and says they have no support and no force of law.

Official Gazette of the Union (in Portuguese)

⚖️ The 11.3% rate

The TCU submits its study to the Senate (11/10), and the committee asks for the methodology (11/18).

Senate News Agency (in Portuguese) · Contábeis (in Portuguese)

💬 The Finance Ministry's 8.5%

The minister estimates the average effective rate at a Senate hearing (11/17).

Senate News Agency (in Portuguese)

🧪 The two calculations

Run by us on 11/23/2026, with the program versions, timings, and full responses.

Kit measurements (in Portuguese)

Common questions

Before you draw any conclusions

Will my prices go up by 11.3%?

There is no way to say that. CBS replaces PIS and Cofins, which are already included in prices, and many products and services get reductions. The calculation varies from case to case, so it is worth running your own.

Has the rate been decided?

No. As of 11/24/2026, the Senate had not yet voted. The deadline is December 15. Until then, the program marks the 2027 result as "simulated."

What are CBS, IBS, and the Selective Tax?

CBS: a federal consumption tax that replaces PIS and Cofins. IBS: the tax for states and municipalities, replacing ICMS and ISS, which only takes full effect starting in 2029. Selective Tax: an extra tax on products harmful to health or the environment, such as beverages and cigarettes.

Does the program's result have the force of law?

No. The Ordinance itself says the code has no force of law and comes with no support. It is a strong reference for checking calculations; responsibility for the tax remains with whoever issues the invoice.

Do I need to do anything?

If you only shop, no. If you sell, ask your system provider whether it already calculates the 2027 CBS, and check a few sales before January.

How much does it cost?

This page, the Federal Revenue Service's code, and the Open Calculator kit are free. The easiest way to run it uses Claude Code or Codex, which come with a paid Claude or ChatGPT subscription.

And you: do you know how much of the price you pay is tax, or will you find out only when you get your January invoice? Free at inema.club, right on the internet.