NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
▲Brazil's tax authority open-sources its tax calculator on GitHub under MIT (gov.br)
usr1106 6 hours ago [-]
Every country that calls itself democratic and free should open-source such software.

No need to support evil giants, it's enough to host it elsewhere.

trescenzi 5 hours ago [-]
The US was working towards this and then it was one of the first things taken down by DOGE.

https://www.wired.com/story/doge-direct-file-chopping-block/

https://github.com/IRS-Public/direct-file

ufo 3 hours ago [-]
A technicality: what is being open sourced here are the formulas used to compute value-added tax and other forms of business tax that were affected by the recent tax reform.

Although the Brazilian tax authority does develop software to file personal income tax, and provides it free of charge, that software is currently not open source.

newyankee 36 minutes ago [-]
If the formulas and laws are not accessible to the public directly is the law even valid.
xbmcuser 2 hours ago [-]
We are getting to a points with LLM now that the tax formulas and etc are the important part now rather than the software itself.
ufo 2 hours ago [-]
This is software though. The repository is written in Java.
maximilianthe1 2 hours ago [-]
Advanced enough LLM can itself create formulas from laws
senorrib 2 hours ago [-]
Doesnt matter if it isnt the same formula applied by tax authorities. Their interpretation of the law is what matters.
alansaber 4 hours ago [-]
Yes, they killed direct file, the motivations are fairly blatant. Open source makes so much sense for this, you can check it and raise issues, raised a few issues for the IRS repos myself (obviously, they were pretty fringe, but this will matter for n=few hundred people)
carlosjobim 4 hours ago [-]
If you can file your taxes through a commercial app, why can't you do it through an open source app? Is it illegal? What's stopping a developer from making a free to use or open source tax filing app?
tancop 1 hours ago [-]
The IRS only accepts direct filings from a list of certified cloud services. It's not illegal to generate a paper filing with something else and submit it yourself like if you did it by hand, it's just a lot less convenient. And you're fully responsible for any bugs in the code.

You could get the official instance of an open source app certified but that takes a lot of time and money.

cwmma 4 hours ago [-]
It's a lot of work (tax code is complex, there are also 50 states) , it changes every year so it needs constant work, it needs to be reletivly easy (else why bother using it) and it needs to be totally correct (a bug that calculates things wrong could have very bad consequences.
tremon 3 hours ago [-]
All the more reason for the government to own and publish it, then the cost of updating the software can be accounted for in all bills that propose new tax changes.
econ 2 hours ago [-]
I once roughly calculated the administrative overhead of a job agency, checking the job agency, several layers of subsubcontactors and the checks the tax office has to do and it was ~3 times the salaries. As the complexity grows (exponentially) the people doing the work get considerably more expensive. I didn't even account for their salary administration which would involve employees who also come with administrative overhead.

It would be quite simple for employers to submit work schedules to the tax office, have employees check them, have the tax office send an invoice to the employer and have the tax office pay the salaries.

Have the employer report sick leave and request overtime at the tax office so that they can get fined.

The subsubcontractor system is full of fraudulent billing but if they have to report something to the tax office all the "mistakes" magically disappear.

bandofthehawk 2 hours ago [-]
If the government worked for the people then sure, they should do that. However, the US government works mostly on behalf of the corporations, and it's in the interest of companies like Intuit and HRBlock to keep the tax code complicated and make it as difficult as possible for individuals to do their own taxes.
alansaber 3 hours ago [-]
People will trust an open source repo maintained by the government. Trusting an open source repo hosted by a third party is a different ball game.
calvinmorrison 4 hours ago [-]
Nothing as far numbers wise as I can tell but the commercial apps have a way to digitally submit it.
carlosjobim 4 hours ago [-]
That's what I'm curious about. Is this digital submission behind some fee that the IRS charges, or a whitelist?
josh_p 3 hours ago [-]
https://www.irs.gov/e-file-do-your-taxes-for-free

Seems based on your income.

This is by design. Intuit spends loads of money to lobby politicians here and keep tax code complicated so they can stay in business. The US in general has a “let the private sector manage these things” mentality but our politicians don’t know how to create actual checks on these industries. Or they don’t care. Or they’re invested financially. Something something conflict of interest.

carlosjobim 3 hours ago [-]
So it doesn't sound half as bad as people are trying to make it. The IRS gives you a free tool to digitally file taxes if you earn up to $95 000.

Seems more like people are complaining for the sake of complaining.

sosborn 2 hours ago [-]
Why should it be capped at $95,000?
eptcyka 3 minutes ago [-]
That implies that here is a tax that applies non-progressively for higher earners. This is the worst kind of a tax, but of course, in practice, it might be fine if 100% pf people who earn 95’000$ and above have to declare extra stuff that cannot be declared in the free form.
rbanffy 1 hours ago [-]
The open source app didn’t donate for any Republican campaigns. This was considered unamerican.
Larrikin 3 hours ago [-]
It's extremely complex, especially once you get into filing taxes for a business. The laws change constantly. To be a serious product, you also have to keep up with atleast 50+1 sets of laws as well, since typically commercial options offer federal for free if you pay for state.

The accountants who are paid to keep up with these things and are most knowledgeable usually only deal with one or a few states. What incentive does any accountant have to lend their expertise to an open source project and help maintain it?

carlosjobim 2 hours ago [-]
So if it's extremely complex, and especially for businesses, then maybe it's fair that people pay for software that does it for them? I think it's normal world wide that businesses pay for people or software for this.

Also, you wouldn't have to make a solution for more than one state if you don't want to.

If I understand correctly, the IRS isn't hindering anybody from making a free or open source solution. So people who complain could either get on it, or use the options at hand.

Larrikin 2 hours ago [-]
Please don't misunderstand my point. I fully think that it should be open source. I've just seen multiple projects start strong and say they are going to start with federal personal taxes and will expand from there. Then I assume they run into the complexity of the issues and just the maintenance needed for federal. They never get state and they never get business. 100% of people filing their taxes need one or both of those. I do not see a point in trusting a new developer that will only do half the job and I will have to enter in all my information again with an accountant or commercial tax software.

I would love to never pay a commercial company ever again. I just no longer get excited when I see an open source project get started for it, because they never come out with the full solution.

The full solution needs to come from the government or some fully funded open source project with a team of accountants and devs.

FranzFerdiNaN 4 hours ago [-]
It’s so bizarre that the US government doesn’t provide a way to do your taxes. At least for citizens.

I live in the Netherlands and the Dutch IRS provides everything I need to do my yearly taxes. Hell they fill in a whole lot of numbers automatically based on what they know about my salary from my employer. Before I owned my own home my yearly taxes took literally five minutes to fill in because of that. Just double checked some pre-filled numbers and done.

toddmorey 3 hours ago [-]
It’s not bizarre, it’s by design. Powerful lobby efforts and another sign of the corporate takeover of Washington. Inuit & others have spent millions to keep it this way.

At one point, the government tried to force them into providing free tax filing for folks with simple taxes… they used every dark art / black hat tactic to trick customers into paying for even the simple free option.

lokar 3 hours ago [-]
Intuit, yes.

But also, the right in the US is fundamentally anti-government (or at least government capacity). They want a return to the federal government of the 19th century, much much smaller.

One strategy they employ is to make people dislike the government. That means reducing its capacity (ala DOGE) so people have a poor experience dealing with it. And making tax compliance unnecessary difficult.

chii 5 hours ago [-]
penny wise pound foolish. This is so unfortunate.
kasey_junk 5 hours ago [-]
It wasn't a cost cutting measure...
dv_dt 4 hours ago [-]
Almost all of the doge cuts cost the nation much more than they saved - especially in costs to the economy at large. Screwworm cost both livestock businesses and increased inflation for food prices and thats one niche example. Cuts were obviously for self enrichment or ideological crusade.
pferde 4 hours ago [-]
Most of the doge cuts were to institutions that were in the way of Musk's companies enriching themselves by any and all means.
nobodyandproud 3 hours ago [-]
Enacted by cocky, high-iq but gullible youngsters who thought they knew better.

Enabling brash, high IQ individuals with incomplete/flawed data leads to the most catastrophic outcomes.

Larrikin 3 hours ago [-]
I don't think there's any evidence they were high IQ
N_Lens 5 hours ago [-]
But definitely sold to the rubes as cost cutting. Just coincidentally defunded every agency investigating Elon’s companies.
Ylpertnodi 5 hours ago [-]
It's ok, Elon's a lefty now.
ivan_gammel 6 hours ago [-]
Yes. Proprietary software that people are forced to use to access government services is a hidden tax. In 2026 the scope of automation is big enough for the governments to maintain in-house engineering teams and use every opportunity including open-sourcing to build better software at lower costs. Today we probably don’t even need to put them in non-profits or subsidiary companies to avoid government salary caps. There are enough people on the market looking for jobs.
cassianoleal 5 hours ago [-]
> Proprietary software that people are forced to use to access government services is a hidden tax.

In Brazil, this software has been made available for free by the Government for at least 25 years. I say this because that's around when I started using it. It was like that for a lot longer. Versions for Linux, Mac and Windows.

What's different now is that they've open sourced it. Great move, and I highly support it! That said, it makes no difference in terms of cost to use the software.

marcodiego 4 hours ago [-]
I think you're confusing this with IRPF, no?
wouldbecouldbe 6 hours ago [-]
I did lot of open sourcing for city governments, but it brings more cost then keeping it internal due to presenting it, docs, meetings etc. Now some people claim you should do those things anyway but not to the same extent
tancop 57 minutes ago [-]
It brings more cost if you want to do it the right way with fully documented internals and taking pull requests, but you don't need to do that.

You can just dump the code into a public repo with minimal build instructions and let people figure it out. Costs you absolutely nothing unless you decide to write your own license and forget to put in the liability waiver. And its infinitely better than keeping it closed.

retwakm4 5 hours ago [-]
I think City governments don't have the scale for it to be worth it to the same extent.

What I'm about to fantasize about is a "bucket list coding project" type thing, but I'd be happy to take a look at the famous IRS tax base mainframe code though. I'm a mainframe systems programmer and we hear stories about the "master file" and oodles of assembly code, which is right up my alley.

Could be transformed to C or C++ today for easier maintainability, but my guess is that they are maybe running without LE runtime services? So maybe that's why it's a challenge to upgrade? Still, it's possible, if you manually initialize libc with an assembler macro and setup your own prelude/epilogue for initialization, comedown, abort cleanups, register passing conventions, and put assembly thunks for all the places you are needing 24-bit memory etc or accessing certain parts of OS common state...

For those not in the know, on z/OS, LE (short for language environment, they didn't call it libc even though that's basically what it is because a lot of other mainframe compilers use it too and the dominance of C at the time on the platform was far from assumed for systems code, but is now probably the case) is basically "libc" (and specifically, here I'll be talking about the crt0 part). Without it you need to make your own allocators, handle all your own register save areas, etc. Back in the day when the IRS first computerized tax, the concept of a system wide "libc" you would link with didn't really exist. Every language had its own runtime library, and a lot of shops still wrote everything like it was a bare metal program using "OS" linkage which is a euphemism for basically linking the way the OS code does, not really "userspace" linkage like modern LE enabled XPLINK (much closer to the ABI and calling convention on a platform like x86_64 Linux, and much more efficient too in terms of padding arguments in registers) is.

Nowadays, you want to make sure the C runtime initializes first so it can clean up your messes (like, stuff that the runtime allocates during an uncontrolled failure), even if you are programming in assembly, and if not, at least you need recovery routines to jump to. Not always possible if you are accessing certain types of OS control blocks or low storage or addressing physically (running in DAT off part of the "nucleus" aka kernel), but still, would love to see the famous file.

And yes, the moment I saw who DOGE was bringing to the IRS to deal with this issue and that it was some hipster web dev groupie, I knew it was gonna flop. Probably ran away in terror when they saw what it was REALLY like programming in the 60s and the 70s as far as perf consciousness went. And that it always universally meant assembly (in a very historic and long lived, but also very CISC-y, ISA, although I suppose it was less CISC-y at the time) because compilers weren't great at optimizing yet.

Anyway, from my position of expertise, that's always been the one governmental piece of code that I thought would be on my bucket list. Who knows, I'll probably end up seeing it one day anyway if I continue consulting. Lots of consultants at the IRS needed to keep that same logic churning....but with more people who knows what you could do...if all the systems software engineers in the US were contributing you could probably get it into C or C++ using a modern version of either of those languages (the latest compiler is I think clang 22 on the platform, possibly even clang 23 for those who compiled themselves or are on a beta branch, so far from an ancient C compiler that doesn't support modern C/C++ standards, and far from the ones back in the days when the IRS code was being written that couldn't optimize well enough to fit in the much more limited memory and CPU budgets of the time.)

Such a task would be a Herculean effort ideally suited for an open source scenario, because you probably NEED every single person in the country that happens to know mainframe assembly and C or C++ if you want it to end up being a success. Especially in the assembly area, there really aren't that many of us, and we are spread out across all the big companies all over the country and can't coordinate a project like that so long as it's closed source.

fn-mote 4 hours ago [-]
> I'll probably end up seeing it one day anyway if I continue consulting.

Where are all of those hackers when you need them? Too bad this the tapes (punch cards? lol) containing that software aren't leaked.

retwakm4 4 hours ago [-]
It would probably not be on tapes or punch cards these days, probably on a big nvme flash storage array (before being loaded into the enormous memories of these machines, we are talking 40-64TiB) and then backed up off site to tape, or maybe they just use Amazon Glacier (which we all know deep down is just tape lol) for that and don't handle it themselves :).
retwakm4 4 hours ago [-]
Also, we are all busy getting paid lol! But if something like this were open sourced, I'd take half a year off and do it for free since it's always been sort of a legendary piece of code within the mainframe community. I promise I'm not the only one who would feel that way about it.
tekla 6 hours ago [-]
> forced to use to access government services is a hidden tax.

Describe. What is anyone forced to use.

ivan_gammel 5 hours ago [-]
It is a quite common case where a government offers a barely functional service, sometimes restricted only to certain certified providers, so that an user has to buy a proprietary solution or hire a consultant to get what they need. In Germany it is unthinkable for a startup to file taxes on their own, everyone goes to a tax advisor and uses the same software, Datev.

I do not know where are you from and what could be a relatable example for you, but I have seen it in different countries.

easyTarget 5 hours ago [-]
Requiring a tax advisor is not the same as directly being forced to use a certain piece of software.
fn-mote 4 hours ago [-]
A startup needing a tax advisor doesn't seem out of line.

Ordinar people needing a tax advisor instead of having a simple way of filing on their own is more the kind of tax being referred to up-comment.

_3u10 4 hours ago [-]
Yes the real problem with US taxation is TurboTax. Excellent analysis.
rib3ye 1 hours ago [-]
I recently learned about PIX and was kinda blown away we don't know there is a tidal wave of work being done to displace American payment processors outside the U.S.

https://whatispix.com/

ffaccount2 5 hours ago [-]
I mean in my country government does the taxes for me, I just need to accept their calculation (or do nothing), unless I want to add my tax breaks, which I can do in 5 minutes thorough the web interface. The software itself is not open source, but there's no need for it. Nobody (except business owners) uses paid solutions.
loloquwowndueo 2 hours ago [-]
Please tell us which country so we can all move there.
vitorgrs 1 hours ago [-]
This is how it works in Brazil too.
chanux 2 hours ago [-]
Sounds like Singapore
wtch98 1 hours ago [-]
What country doesn't do it?
loloquwowndueo 40 minutes ago [-]
The US for one (luckily I’m not there phew)
_factor 1 hours ago [-]
We should have the code documented in a repo and an approved llm to do the taxes where the government will forgive any errors and rectify. The current tax system is akin to the government throwing glue on the ground and allowing companies to charge for pulling you out every year
dachris 6 hours ago [-]
Yes! And it's not only evil giants, even in small countries there's dozens (or even hundreds) of software companies needing to adapt their software after laws pertaining to taxation or finance changes.

Open source and publish as a npm, NuGet etc. package.

alansaber 4 hours ago [-]
Exactly. Versioned law, corresponding updates to tax software. I have written on exactly this, apologies for self promoting https://lexifina.com/blog/formalizing-tax-code-globally
drysine 4 hours ago [-]
>Every country that calls itself democratic and free

Maybe then they will catch up with tyrannical Russia where government provides all the necessary software for filing taxes for free (for over a quarter of century). Some of it (most of it?) is also duplicated as online services.

philipallstar 6 hours ago [-]
You have to support them or you go to jail. Same as the good giants.
lifeisstillgood 6 hours ago [-]
It’s a long slog and frankly I gave up and got a proper job

https://web.archive.org/web/20170906160619/http://oss4gov.or...

alansaber 4 hours ago [-]
It's jarring isn't it because the path to minimising human work, and improving the quality of what exists, is so blatantly clear in this domain
madduci 6 hours ago [-]
Every software paid by citizens' taxes should be made open
alansaber 4 hours ago [-]
This is something i've been working on https://lexifina.com/blog/formalizing-tax-code-globally
Hackbraten 2 hours ago [-]
I don’t think GP was referring to tax codes specifically but any software paid for by taxes.
lifeisstillgood 5 hours ago [-]
https://web.archive.org/web/20170906160619/http://oss4gov.or...

Im glad you think that way - Im wondering if it’s worth reviving a real campaign to influence our representatives?

Is anyone else out there organising ?

madduci 1 hours ago [-]
At my company, which is fueled by tax money, we have this ethical push to bring tools in the open world, so we started our OSPO program a couple of years ago.

I didn't know about this manifesto, thanks!

TacticalCoder 5 hours ago [-]
And institutions shouldn't be paying money to Microsoft and the like. Doubly so for european institutions.

But illegal kickbacks paid by companies selling turds are a powerful mechanism that guarantees inferior software are used in a great many places.

embedding-shape 37 minutes ago [-]
> And institutions shouldn't be paying money to Microsoft and the like. Doubly so for european institutions.

Are you European or why is it so much more important for "European institutions" to not use Microsoft compared to Asian or African institutions? Such a weird specifier without the context why it'd be more important.

Agree with the overall point although I'd take it one step further, without continent/country restrictions: no governments in the world should rely on a for-profit corporation, full stop.

wouldbecouldbe 6 hours ago [-]
There are extra cost to open sourcing software the right way
basilgohar 5 hours ago [-]
It's a fact but so is the one that we pay a LOT more for a LOT of other things far less important through our taxes. It's a strawman to point to this as waste and then ignore the huge swath as others.
newsclues 6 hours ago [-]
Glad to pay that.
rendaw 2 hours ago [-]
What costs?
JassanSanjay 4 hours ago [-]
Exactly, but in current world demanding our own rights from governments is far more difficult than building a startup, lol.
fleroviumna 3 hours ago [-]
[dead]
rfgplk 6 hours ago [-]
All software should be made open and intellectual property should be abolished.
smashah 6 hours ago [-]
All weapons development should be open source also.
RobotToaster 5 hours ago [-]
Oddly the US Army has the oldest public open source software repository https://en.wikipedia.org/wiki/BRL-CAD
cannonpalms 6 hours ago [-]
Do you actually believe this?
smashah 46 minutes ago [-]
100% it should be a capital punishment war crime to do closed sourced weapons development.

This is the path to world peace.

flykespice 2 hours ago [-]
Do you have any good reason weapon development should be a state secret to a particular state? Specifically when said state uses it to destabilize other countries?
rfgplk 6 hours ago [-]
I genuinely believe that _all_ technology should be unencumbered by pointless copyright, patents or restrictions. It's also impossible to define what a "weapon" is. A high powered leaf blower can be deadlier than a high caliber bullet. A homemade bomb can have a higher yield than many US Air Force conventional explosives. How do you define what a "weapon" is, other than the existing definition of "Lockheed Martin would like to retain rights over a system they built so let's define it as a weapon"
docshock 5 hours ago [-]
Regulatory capture is more powerful than any market force. The current regulatory capture campaign is "safety" for LLMs. If companies succeed in getting LLMs declared unsafe in the hands of consumers, it is game over.
dlisboa 6 hours ago [-]
From what I heard of people living in other countries, Brazil is much more advanced as far as digital government services go.
ifwinterco 2 hours ago [-]
I've never been but viewed from afar Brazil seems like a weird combination where some things (like digital government services) work really well and other things (like security and crime) work really badly?
kranke155 20 minutes ago [-]
I describe it as the level of social inequality and societal conflict in Brazil comes from it having neighbourhoods that are close to US level of income and others that are like underdeveloped nation level of income - and they are 5 min away from each other.
soapdog 1 hours ago [-]
Well, part of it is that the federal government is responsible for most of that digital stuff, while crime and security are handled mostly by state and city governments. So if you have a good federal government but live in a disfunctional state, then you experience what you just described more often.
dlisboa 2 hours ago [-]
That’s a good take. It’s highly developed in some areas and underdeveloped in others. Quality of life varies towards how much you’re exposed to each of those extremes.
jimmydoe 5 hours ago [-]
same as india, they have a lot of contracting biz to usa, that made the availability of digital labor/expertise quite available to gov too.
hagbard_c 6 hours ago [-]
From what I hear from people in Brazil the country is also far more advanced in taxing and levying [1] so that imported goods are far more expensive than 'across the border'. A product with an FOB cost of $100 at the port of export costs $200 to $250 after incurring the Brazilian import taxes and levies (II, IPI, PIS, COFINS and ICMS - most of these are recursive, i.e. 'tax on taxes') and no, this is not a Lula da Silva thing, it has been like that under Bolsonaro and his predecessors for a long time.

[1] https://mybusinessbrazil.com/import-costs-in-brazil-2026-wha...

icantevenhold 5 hours ago [-]
You make it sound like that’s a bad thing though?

Wouldn’t it encourage more domestic production, and thus more and better jobs and long-term sustainability? I think Brasil has more than enough natural resources to produce basically anything.

Fabricio20 5 hours ago [-]
> Wouldn’t it encourage more domestic production You wish but how do you domestically produce CPUs, GPUs, RAM? Even the US has failed at scaling production of these. Not everything can magically be produced locally and most of the time the taxes create a backwards incentive where eternally sending money out and never building infrastructure here is still more accessible. Keep in mind the currency being worth nothing compared to the US makes things worse locally too, why sell your farm produce locally when you can make 6x as much by selling it abroad?!

With tech this bad then everything suffers, we have to outsorce all server hosting, websites, databases, everything goes to the US, because its just twice or sometimes way more than twice as expensive to have a server in Brazil of equal capacity!

<rant> Not everything can be domestically produced and these insane taxes just make things worse in certain industries, want to buy computers for schools that dont suck ass? Still gonna have to pay insane taxes on top of the insane exchange rate too and no your warranty claim is not getting respected and sending the product to the US and getting a warranty claim back will cost you the same as a new product in just taxes alone. Ask me how my "oculus quest 1" i know.. Its just a lose-lose game for the entire industry and especially with servers, most brazilian's data end up processed in the US and theres zero incentive to build infrastructure here, because everything is so damn expensive, by the time you are done recouping the costs of actually owning hardware in BR you are so outdated that you might as well have spent 1/5th of it on hosted infra in the US. </rant>

dubcanada 4 hours ago [-]
Your thinking entirely tech, but that is not a fair way to think about things. Very few countries can actually produce CPU, GPUs, RAM, even USA cannot.

But there is only so much a government can do, they need to ensure their local population can support itself. People do not need CPUs, GPUs, RAM, they need food, water, health care, the actual necessities of live. And all of that can be produced in Brazil year around for the most part.

The fact that you have to pay 2x the price for a phone as somewhere else, doesn't have much to do with the fact that I in Canada pay probably 5x what you pay for produce and meat. I would much rather pay more for an iPhone and significantly less for vegetables and meat, then the opposite.

tancop 52 minutes ago [-]
That's a good reason to have tariffs (and subsidies) on food that can be produced in Brazil.

But with tech there is absolutely no plan to build a domestic industry so it's a permanent regressive tax with none of the benefits tariffs can give you. Building chip fabs is the kind of thing where you need direct state investment to make it work, which is not realistic in a country with way bigger problems.

bemtevi 3 hours ago [-]
Just to correct your last paragraph a little: while it's true that you're going to pay 2-3x the cost for an iPhone, there are affordable phones down here from companies that have established a strong local presence like Samsung. You won't get the ___same___ phone but you'll get a decent one. Less options of course.

Food isn't 5x cheaper but it's more like 2x cheaper (Canadian living in Brazil here.) And of course land is 10x cheaper. HHahhaha.

drdexebtjl 2 hours ago [-]
Some food is much more than 2x cheaper though (Brazilian who lived in Canada here). Beef, most fruits and vegetables (except berries), coffee, cheese and milk, to name a few. Processed foods are about 2x.

If you go to a supermarket in a high-income neighborhood, it won’t feel like that, though.

rescbr 4 hours ago [-]
Eh… tax rates for products that go through the formal import mechanism (i.e. the one distributors use) are completely different to the ones available to a natural person.

In fact many parts I bought for my PC had their prices at the same or at lower prices than what it retails in the US. Others I bought on a trip to the US.

There is a LOT of profiteering done by intermediates that is blamed on taxes (hello car manufacturers!), and them being cascading also does not help. The fact that they are structured in this way simply makes it opaque to the layman and allows for this scapegoating discourse while allowing for increased profits. Thankfully the new VAT structure will remove these cascading effects. It’s 20-30 years late, and will take longer for the tax regime to be fully transitioned, but it was finally approved.

Remember that Brazil opts to have high consumption tax rates while having lower income and property tax rates, which impacts people with lower income. There is zero dividend tax! Ask any colleague that lives in an OECD country how much do they pay in taxes combined (consumption, income and property) and you’ll see that you pay proportionally less in taxes than them.

The problem with Brazil is misallocation of public funds, corruption, bureaucracy, the famous custo Brasil, not that “taxes in Brazil are high”.

bemtevi 3 hours ago [-]
Not every country will produce everything though. For instance, Brazil is unlikely to produce cameras or certain kinds of electronics. But the tariffs on those are still around 100%. And the shipping is often also taxed.

Plus it also creates more inequality in Brazil, especially since there's a rule where you can import up to $1000 of stuff duty-free if you bring it in through a personal flight. So the rich get to import stuff duty-free on their holidays and the poor cannot. And many people just bring in more than 1K worth of stuff.

Not saying you're wrong. It could encourage local production. But often the ones lobbying for this sort of import are the huge businesses that don't want competition either. And it biases the market towards corporations with the legal knowhow (and skill in bribery) to get in the market and be an effective monopoly....

(I live in Brazil.)

whou 2 hours ago [-]
The problem is that we still are in a dire need of reindustrialization. We do have the qualified workforce and engineers to produce it, and even some national consumer brands have always been, in my opinion, higher quality or as good as their foreign counterparts (e.g. Havainanas, Olympikus, Mondial, Britânia).

The last time a president tried to, in some degree, make changes for a path towards reindustrialization, well, the national bourgeoisie did not appreciate it, to say the least.

afarah1 5 hours ago [-]
From 1984 to 1990 Brazil completely banned all computer related imports to develop its national industry. Since then, high import taxes have remained, sometimes over 100%. Do you see a booming high tech industry in Brazil?

https://www.nytimes.com/1990/09/13/business/brazil-to-drop-c...

vitorgrs 1 hours ago [-]
The highest import taxes in Brazil it's 35%, no 100%. Do not confuse "Aliexpress" tax to business import taxes.
bemtevi 3 hours ago [-]
What we see in Brazil is a high dependence on US tech firms and Chinese imports.

It's true that a lot of stuff is made in Brazil, and that's a good thing. I try to buy that stuff when I can. But the import law has such a wide scope that it often hurts when it shouldn't really.

owebmaster 5 hours ago [-]
Especially for a country with 220 million ppl. You can't import stuff for everybody while almost nobody is exporting
forinti 5 hours ago [-]
At the moment we are paying only ICMS (state tax). I bought earphones from China this week, and these are the values I paid:

Earphones R$76,29

Shipping R$33,68

Tax R$22,56

Total R$132,53

ICMS is 17% but you have to include shipping and it is charged "from the inside", that is, your tax is 17% of the total paid, not a 17% surcharge: 22.56/(76.29+22.56+33.68)=17%.

ewsbr 4 hours ago [-]
I recently bought a ~$1000 laptop (for R$6459).

Tax: R$2746.37 (42.52%), out of which R$1486.86 are federal taxes and R$1259.51 are state taxes

So the store made R$3712.63 out of my purchase. Electronics in Brazil are wildly expensive, and there is no real competitive national industry. Sony VAIO is one of the few companies that assembles laptops in Zona Franca de Manaus (which gives a lot of tax benefits), but it doesn't provide any higher-end models.

For context, the latest 16 inch Macbook Pro costs $3000 in the US (give or take 10% state taxes). In here, the same purchase in the Apple store goes for R$37,999 ($6386). Fun.

I'm just hoping that things don't get much worse with the new tax reform...

dlisboa 4 hours ago [-]
People really don’t understand how much profit companies make in Brazil. Tax is not the reason why MacBooks cost 220% what they do in the US. There is no combination of tax that reaches that. Same thing with cars, companies make more profit in Brazil than in Europe. Profit per unit sold is much higher here, which we could call price gouging.
kawera 3 hours ago [-]
Exactly! Apple pays 12% to 14.5% in import duties in Brazil, depending on the item, plus sales tax (ICMS, which is around 20% and varies by state). Their margins here are massive.
dlisboa 3 hours ago [-]
And yet the federal government (or more generally "the left") is always somehow the culprit, when they don't even set most of the tax burden.
greeniskool 3 hours ago [-]
> Sony VAIO Not Sony -- the VAIO brand was sold years ago, and every product with the VAIO brand you see being sold in Brazil today is really made by Positivo.
lbrito 2 hours ago [-]
I'd rather have high import tax and low income tax. Brazil's top income tax bracket is 27.5%.
kawera 2 hours ago [-]
> Brazil's top income tax bracket is 27.5%

Making it one of lowest in the world.

howunfortunate 51 minutes ago [-]
> Lula da Silva thing, it has been like that under Bolsonaro and his predecessors

Those predecessors were...drumroll...literally Lula (and then Lula's party member Dilma while he was in prison)

snowpid 6 hours ago [-]
Where do you live? It is definitely not clear.
dlisboa 3 hours ago [-]
I live in Brazil. I'm comparing it to people I know living in Europe, Japan, USA. A lot of things still done on paper or in person, specially for health care related things. When they come back for a visit they're always amazed by something new that is just table stakes here.
_3u10 4 hours ago [-]
It’s not.

I had to use AI to help my gf who is Brazilian and a lawyer use the form the embassy gave her to get her CPF.

The AI initially refused saying it was a fake form, eventually it fixed the JavaScript and she got her CPF form done.

To find her birth certificate she had to phone every office in São Paulo to ask if they had it and then we had to fly to São Paulo to get it, she could not even make a power of attorney for another lawyer to do it.

Brazil is a very large joke.

soleveloper 3 hours ago [-]
If I find a bug in an open-source tax calculator, is that tax planning or tax fraud?
firefax 3 hours ago [-]
Does Brazil have a tax culture like the states where they make it purposefully complex?

NL and others, they seem to give you a report akin to what Turbotax and like spits out and basically invite you to correct them if you think they're wrong but otherwise there's no need to "file" anything.

vitorgrs 1 hours ago [-]
Yes. It's way worse than the US even. Which is exactly this tax reform was made, now it will be more like Canada VAT.
flykespice 2 hours ago [-]
Yes, Brazil tax system is notoriously complex.

For example, when you are buying imported products like from Aliexpress, two taxes are involved: a federal tax applied over the top of the imported price (%20 for <=50U$ shopping, 60% onwards) and a per-state basis ICMS.

econ 1 hours ago [-]
A commercial entity can't really sign of on it. They can only pretend and hope it is correct. If government delivers the code then that is the code, even if it has bugs or typos.
aliljet 53 minutes ago [-]
This really should be the case in the United States too...
matheusmoreira 4 days ago [-]
This is awesome! Looking forward to exploring this repository.
godwinson__4-8 34 minutes ago [-]
Good for Brazil and good for Brazil for resisting US government pressure to ram MasterCard and Visa down their throats.

Their payment system is a public service too. Imagine living in a society that didn't support leeching monopolies and a private tax on every transaction in the name of greed. Why are the CEOs of these companies multi millionaires? When was the last time your credit card innovated? Why do we allow what is really a private, pervasive data collection scheme as another version of the corporate service/government client loophole backdoor against the American Bill of Rights?

When one realizes the history of United States meddling in LATAM suddenly the harboring of Bolsonaro in Miami makes a lot more sense.

Local Democrats should follow Brazils lead. Grocery stores in New York should be followed by initiatives like this. An open source city would defeat the enshittification of politics itself.

fvpoabr 21 minutes ago [-]
Are you serious? Let’s make a deal: You come to Brazil, and I’ll go to the U.S. You can live here with the wonderful Pix, and I’ll live in the U.S. with the boogeyman Visa and Mastercard.
mococa 4 hours ago [-]
Brazil mentioned https://ibb.co/gFQbpG5T
jmclnx 4 hours ago [-]
Interesting, when I dealt with tax software a years ago, Brazil had the craziest rules. IIRC, the president could wake up in the morning and decide the rates change that day. Are their tax rates more stable now ?
lbrito 2 hours ago [-]
You're thinking of presidiantialist governments. Brazil is no different than any other. The president can wake up and sign an XO changing some federal law. But congress will need to approve it after some time, and if of doesn't the change is reversed.

The US income tax bracket changes as much or more than Brazil's.

wbqa_oct6_0e57 5 hours ago [-]
America should do the same. I believe Intuit has government backing of some sort.
alansaber 4 hours ago [-]
There are a few IRS repos but none are official. AFAIK only a handful of govts have official open source repos they haven't killed.
JassanSanjay 4 hours ago [-]
That's interesting, it could never happen in india sad
astropietro 6 hours ago [-]
i love brazil man
mococa 6 hours ago [-]
We love you
TacticalCoder 4 hours ago [-]
It's good but then... It's 2026 and the latest models, and especially the Gemini ones from my testing, are exceptionally good a filling your taxes and making computation as to what's going to be due. It probably won't be correct to the cent, but it's going to be close enough.

I'm filling mine right now and there are quite a few things: married, one kid, some dividends from shares in a private company, salaries, additional invoices for a side-activity (and VAT and social wellfare taxes etc.), interests, dividends in various currencies that have to be accounted for in a specific way, real-estate income and some expenses, insurances, etc.

Thanks to AI it's much easier than last year. Actually, this year without an accountant is easier than last year with an accountant.

And this time I'm already planning for AI to fill everything next year: so I keep everything, all my notes and "assets" files, and fully plan, in one year, to ask an AI "look at 2025 and do the same for 2026".

And there are crazy things: for example my country's IRS handles PDFs to fill (that you must then print and send in paper form), but they're sloppy PDFs (made by people who've never done typographical work: I did). No two pages have the same sizes for example and its endless hell for a lot of people: for example they don't print properly. Stuff you entered correctly in boxes in the PDF do print on the wrong line etc.

But it's not a problem: the AI can both fill and fix the PDFs so that they then print properly.

vemv 3 hours ago [-]
Having AI write a deterministic program that fills your taxes is fundamentally better. And have some test cases, e.g. your past tax declarations.
InsidiousWombat 6 hours ago [-]
Claude find me a tax loophole
Izmaki 6 hours ago [-]
I know this is a joke but it hopefully also helps them identify hard-to-identify loop holes now. :P
Aboutplants 5 hours ago [-]
You used to have to pay an expensive accountant to find out about these, the floor has been elevated
tekla 6 hours ago [-]
I dont think Brazil has a 401K system like the US
pjmlp 6 hours ago [-]
I hear some banks have excellent advisors, for the right price.
robotswantdata 6 hours ago [-]
“I can't help you find illegal tax loopholes or evade taxes, though I can share common tax-reduction strategies you might discuss with a CPA, or connect you with our sales team to discuss Claude Ultra-Net-Worth ($20,000/month), which replaces my 'harmless' training principles with 'fiduciary duty.'”
r2ob 2 hours ago [-]
In Brazil, there are so many accounting rules—with constant changes and subjective provisions—that, for all you know, this repository might already be outdated.
Spixel_ 5 hours ago [-]
Hope they accept changes via pull requests!
fidotron 5 hours ago [-]
Should be the case everywhere, as should being able to perform all government interaction via API.

BRB using Claude to find previously unidentified opportunities for tax optimization.

alansaber 4 hours ago [-]
I know this is a joke but in the US at least, tax optimization can still be litigated if it doesn't have any clear commercial value. The numbers are such that, since the scope of IRS audit is so small, most take the risk, but that dynamic in itself will probably change as the IRS increase adoption of AI, etc.
pettijohn 3 hours ago [-]
I hope someone is working on an open source Turbo Tax replacement. People are vibe coding Photoshop in a week, can we liberate the people's taxes too!
dzonga 3 hours ago [-]
here on hn people like to shit on java but damn the world runs on java.

even the software irs open sourced was a java stack.

bitlad 5 hours ago [-]
Would be interesting if the taxes dont work because of github action issues.
alansaber 4 hours ago [-]
Github actions is bad, but they at least try. The japanese caselaw archive was casually down for ~10 days recently.
xbar 5 hours ago [-]
Tell them to upgrade their SSL to TLS.
crackalamoo 2 hours ago [-]
Imagine submitting a PR to this. A truly open tax code
filessnap 6 hours ago [-]
What interests me here is the choice of the MIT license, not just the code release. It lets software vendors reuse the calculator directly, so the official rules can be embedded rather than reimplemented.

For a tax reform with new consumption taxes, I'd expect the real value to be a single reference implementation that everyone can test against, so different vendors don't each interpret the rules differently.

Does anyone know whether the repo accepts outside pull requests, or whether it's mainly published for transparency?

alansaber 4 hours ago [-]
It's the most diplomatic license for this use case so perhaps not too surprising
usr1106 6 hours ago [-]
Embedding it correctly into closed source has the advantage it works correctly.

But no external can verify it really was done correctly, only a non-permissive license would allow that.

luizfzs 5 hours ago [-]
I mean, no external entity can today verify that the proprietary software correctly implements the same rules the government uses, so this point is moot.

What it accomplishes is not having each company that accepts payments having to implement their own calculations, and change it every time a rule changes. It frees business to work on other things.

patryk_builds 5 hours ago [-]
[flagged]
barddoo 22 minutes ago [-]
[flagged]
tusunsun 5 hours ago [-]
[flagged]
fleroviumna 3 hours ago [-]
[dead]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 18:23:17 GMT+0000 (Coordinated Universal Time) with Vercel.