Pricing Brazil’s 2027 tax reform
A free, public calculator that shows business owners what happens to their price and margin when Brazil’s consumption taxes change in 2027.
Open the calculator · Role: product owner, pricing analyst and developer · Stack: React, TypeScript, Vite, Cloudflare
The business problem
In 2027 Brazil starts replacing five consumption taxes with a dual VAT (CBS and IBS). The new taxes are charged on top of the price instead of being built into it, and buyers get them back as credit. That changes the whole price waterfall: the invoice total, the seller’s margin and the real cost for the customer.
Small and mid-sized companies have to reprice before the rules are final. The official tools from the tax authority calculate the new tax on a known base, but they do not build a price, do not cover today’s regime and say nothing about margin. Most companies are left with spreadsheets and guesswork.
Who it is for
Four audiences, each with a different question:
| Audience | Their question |
|---|---|
| Manufacturer | “Does my customer pay more or less in 2027 at the same list price?” |
| Importer-distributor | “What happens to my landed cost at customs?” |
| Service provider | “How much do I need to raise my fee?” |
| Retailer | “Do I keep my shelf price or pass on the gain?” |
What it shows
The same transaction under two rules, today’s and 2027’s, side by side. Examples taken from the live site:
- Manufacturer, same list price of 100.00: the buyer’s real cost falls from 107.93 to 100.00 (-7.3%) while the seller keeps a 45.0% gross margin.
- Consulting firm, same fee of 1,000.00: the cost for a business client rises from 993.43 to 1,058.58 (+6.6%). Services carry the heaviest shock.
- Retailer, same shelf price of 180.00: gross margin goes from 27.5% to 32.1%, or the shelf price can drop to 172.13 with the margin unchanged.
Product decisions that mattered
- The buyer’s view, not only the seller’s. Under the new rules a higher invoice can mean a lower cost for the customer. Showing both sides is what makes the result usable in a sales conversation.
- Uncertainty is part of the interface. Every one of the 50 assumptions carries a badge (law, regulation, assumption, or entered by the user) with its source and date. Open points, such as the final CBS rate, can be changed on screen.
- Out of scope means blocked, not guessed. Products with reduced rates are outside this version. The calculator refuses to compute them instead of returning a wrong number, and warns when a product in scope may qualify for a reduction.
- Privacy by architecture. No server and no account. Nothing the user types leaves the browser; a network test confirmed it.
- Results that travel. Every result exports to PDF, Excel or a shareable link, stamped with the assumptions version, so a number can always be traced back.
How I built it
- Static site, own calculation engine. A pure TypeScript engine with decimal arithmetic, separate from the interface, so the math can be tested on its own.
- Versioned tax data. Rates for 27 states, 85 product codes and the service reductions live in data files with a version number. A published version is never edited: a correction becomes a new version, listed on a public changelog.
- Bilingual. Portuguese for the users, English for reviewers, with a tax glossary approved term by term.
- Hosting. Cloudflare Pages behind a small Worker that serves it under my own domain, with a strict content security policy.
How I validated it
| Check | Result |
|---|---|
| Test cases worked out by hand, line by line, before any code | 82 |
| Automated tests (unit and integration) | 1,966 passing |
| End-to-end browser tests | 141 passing |
| Accessibility (axe), 36 pages in 2 languages | 0 serious or critical issues |
| Lighthouse | 93 to 100 on mobile performance, 100 on accessibility, best practices and SEO |
| Network test | no typed value sent anywhere |
Results
- From approved prototype to production in eight days, with a decision log of 26 scope choices.
- Live at thalesnavarro.com since November 2026, in Portuguese and English.
- Built to be updated: when the Senate sets the final rates, the change is a new data version; the calculation code stays the same.
Usage numbers are not shown yet. The site runs without cookies, so it can only report aggregate traffic.
What I learned
- In pricing, the hard part is deciding what to hold constant. Same list price, same supplier price, same margin: each choice tells a different story, so the calculator states its choices up front.
- Saying “I don’t know” builds more trust than a confident wrong number. Blocking out-of-scope products was one of the best decisions in the project.
- Tax rules are data, not code. Treating them as versioned, sourced data is what makes a tax tool maintainable while the law is still moving.
Next
- An English guided tour over the Portuguese screens and a short video.
- A usability round with five users: two specialists and three non-specialists.
- A rate update as soon as the Senate decides.