All the calculations occur directly in the browser, and are powered by a Fortran program that has been converted to WASM using emscripten. This calculator was originally developed in the 1970s [1] by the non-profit National Bureau of Economic Research. NBER has been maintaining this F77 codebase for the last 50 years, and uses it primarily for academic research on tax policy. The Fortran source code itself is over 1MB of text, because it codifies both federal and all 50 states' tax laws for each of the last 62 years.
I first learned about NBER TAXSIM [2] a few months ago via an interesting paper they published "Automatic Tax Filing: Simulating a Pre-Populated Form 1040" [3]. The Fortran code itself is not open-source, but is available on request for research purposes. I reached out to NBER and proposed compiling it to WASM, so it could be run directly in a browser. With relatively little effort I was able to create a js/wasm version [4], thanks in huge part to previous open-source work [5].
This WASM build now powers https://taxsim.app, which is my attempt to create an interactive UI to allow for easier exploration of the US tax code. Specific tax scenarios can also be shared easily, by simply copying the browser URL. The code for this webapp is also open-source [6].
This was my first time experimenting with WASM, and I am already a huge fan. Not only was I able to take a 60 year old codebase and get it working on every modern browser and device, this work is also now benefiting the academic community. For example, the js/wasm can be run directly in V8, which means it can also now be run locally within R using libv8 [7]. Previously most researchers were uploading their tax scenarios to NBER's servers via ftp/ssh/http.
[1] https://taxsim.nber.org/feenberg-coutts.pdf
[3] https://www.nber.org/papers/w30008
[4] https://github.com/tmm1/taxsim.js
[5] https://chrz.de/2020/04/21/fortran-in-the-browser/
I'd love to get in touch. Will email you from max@policyengine.org.
For example, I inputted married, with no dependents with $500,000 salary and in 1977, the federal amount was $299,864 and in 2020 was $133,947. I assume these amounts can be compared without further adjusting for inflation?
Tangentially, did federal taxes really come down that much?
There was a major overhaul of the tax code in the 1980s that simultaneously eliminated many of the tax deductions and offset that loss of deductions with lower the marginal tax rates. The change was approximately revenue neutral but made the tax code simpler.
https://taxfoundation.org/historical-income-tax-rates-bracke...
Our wealth inequality problems could largely be solved by fixing the tax brackets (especially w.r.t. capital gains). We don't need all sorts of new taxes, certainly not a wealth tax, before fixing the obvious problem.
That being said, $500,000 should have been taxed more heavily in 1977 relative to today in a perfect world, because that amount of money was worth a lot more back then. I don't think the numbers are inflation adjusted or it would make sense to do so without a big warning.
the other thing people don't mention is that companies got around higher tax rates by giving benefits like company cars and other things to entice employees when giving a higher salary would be stupid due to high tax rates. This is how things like health insurance ended up getting tied to employment, always unintended consequences
Same result. different cause (in this case)
Tax straddles were only banned in 1977 before that you should have easily been able to more then halve your tax bill with futures.
Looking for Tax Losses in Commodities (1977) https://www.nytimes.com/1977/12/11/archives/investing-lookin...
I.R.S. Wins On Tax Straddles (1982) https://www.nytimes.com/1982/03/10/business/irs-wins-on-tax-...
They are wildly popular in the options (including futures options) market, but what is described here would be called a calender spread or an unbalanced strangle of some sort. No tax benefits from closing long dated contracts early aside from losses offsetting the gains
> For example, an investor with a capital gain manipulates investments to create an artificial loss from an unrelated transaction to offset their gain in a current year, and postpone the gain till the following tax year.
Feature request: Put the effective overall tax rate calculation somewhere on the page - so often people are confused that they are paying the same percentage tax as their highest marginal tax rate, this tool could help elucidate that mistake.
There are “only” 5 possible inputs under Deductions & Credits but 3 of them are categories with several subitems:
Itemized Deductions
• Home mortgage interest
• Deductible medical expenses
• Motor Vehicle registration fees
• Charitable contributions
• Casulty or Theft losses
Other Itemized Deductions
• Other state and local taxes
• Deductible medical expenses (preference share only)
• Miscellaneous expenses
Other Adjustments
• Alimony Paid
• Keogh and IRA contributions
• Foreign Income Exclusion
• Net Operating Losses
There are some schemes through employers that reduce your taxable income (for e.g. a scheme to purchase a bicycle tax free) but these are handled by your employer and work by sacrificing some salary in exchange for the benefits.
That said, in tech Americans seem to make 50%-100% more total comp on a cost of living adjusted basis doing exactly the same job...
That's a generalisation, although some conservatives do make the claim. It's nonsense, of course: the most other developed countries including the UK spend around a third as much per person on healthcare. Another victim of poorly regulated market consolidation (among other factors).
I had excellent results with f2c on an old Fortran program when I used it.
This will be much simpler/easier than gfortran+dragonegg, and removes some roadblocks preventing me from using the latest emscripten/llvm.
Imagine if IRS would produce something like this (open sourced) and we could file our returns like this.
> Each year Americans spend over two billion hours and $30 billion preparing individual tax returns, and these filing costs are regressive. To lower and redistribute the filing burden, some commentators have proposed having the IRS pre-populate tax returns for individuals. We evaluate this hypothetical policy using a large, nationally representative sample of returns filed for the tax year 2019. Our baseline results indicate that between 62 and 73 million returns (41 to 48 percent of all returns) could be accurately pre-populated using only current-year information returns and the prior-year return. Accuracy rates decline with income and are higher for taxpayers who have fewer dependents or are unmarried. We also examine 2019 non-filers, finding that pre- populated returns tentatively indicate $9.0 billion in refunds due to 12 million (22 percent) of them.
[1] https://www.nber.org/system/files/working_papers/w30008/w300...
This only works because there's a high level of trust in the government and low corruption, and having detailed tracking isn't (very) controversial. The US is almost the exact opposite on every metric so it wouldn't work for it.
Only if 100% of your income is reported to the IRS. Small amounts (under $600) often aren't, and while you might be able to get away with not reporting it, its obviously not legal. I had some slightly unusual small sources of income the past couple of years that I had to keep records of, report, and pay taxes on.
Granted, a lot of people arent going to have much more than a W2 and maybe some interest income.
As an aside, I'd love to see US gov research grants start requiring the work product to be made open source.
I assume there were also some campaign contributions that changed hands.
def computeTax(**kwargs):
.. blah blah ..
return how_much_you_owe
Of course we all know what comes next... from scipy.optimize import minimize[2] https://taxcalc.pslmodels.org/
[3] https://taxcalc.pslmodels.org/about/history.html
[4] https://github.com/PSLmodels/Tax-Calculator/blob/master/taxc...
The adjustment process seems to be opaque[1] but perhaps you could use a regression to estimate it. Then you would only need the ability to make those adjustments in this program to run future year scenarios.
1: https://www.irs.gov/newsroom/irs-provides-tax-inflation-adju... (I’m uncertain whether this is based on some predetermined formula)
You can't even always estimate current year taxes, since Congress has lately taken to making retroactive changes to the tax code even after the end of the tax year (just extending their long-term habit of making changes in late December of the current year).
Currently, many Federal tax forms are supported, as well as tax filing for the state of Illinois. Filing for Oregon and California is under development!
“TAXSIM: Unbelievable spouse age”
Apparently it's not believable that people 115 years or older would be filing taxes.
I think one issue with calculators like this is it doesn’t account for excluding revenue that now has to be included.
https://nypost.com/2021/10/05/court-upholds-trump-law-limiti...
Basically, prior to that implementation, you were really paying MAX(federal income tax, state income tax). After that implementation, you could only deduct a maximum of $10,000 in state income tax from federal tax. So it looks more like: ADD(federal income tax - $10,000, state income tax)
You could deduct your state tax from your income for federal tax purposes. So if you made 100k and paid 17k in state taxes, your federal AGI was 83k. Post change, it would have been 90k.
The Trump era change was really a fuck you to high earners in states with high taxes. Shockingly, a majority of those people tended to vote for the Democratic Party.
Can you do it the other way round I wonder? Just give up and use a new version and ask legal to send this open source to all agents. After 3 years day this is the version.
It is not a sim issue. It is not a pre-filled issue. It is a real issue.
Or my brief to my kid is wrong. It is about something else.
It would also be great to provide a line graph that shows the result for all years. There’s no reason to have to select each year one-by-one.
I find myself putting in my info and then click minus on the years to see how the years change.
It should not phase out at 150,000 anymore, but rather starting at 200,000 for single or 400,000 for married filing jointly.
I think it gives a general idea of the tax situation, but possibly decreasing accuracy at high incomes, where a tax strategy can be implemented specific to the special deductions/credits each year, which are difficult to include in this form.
Apparently, you’re not allowed to have more than 15 dependents.
If you’re taking feature requests I’d love to see a bar or line chart showing the amount of taxes paid for the Y axis and year on the X axis. Would make comparing over time much easier.
[1] https://www.thebalance.com/cities-that-levy-income-taxes-319... [2] https://smartasset.com/taxes/income-taxes
Anyway taxsim is obviously the more complete tool, but without local income taxes it's unusable for many people like me who live in a state that has local income taxes too.
1. A plot over time
2. Could you adjust the income for inflation, so when you click back 1yr your income goes down accordingly?
In fact, it is more popular than ever: the temporary TCJA tax changes (2018-2025) for individuals mostly consisted of moving features of AMT into the regular tax regime. No personal exemptions, large standard deduction, no mortgage interest deduction for equity debt, limited state and local tax (SALT) deduction, mostly no miscellaneous itemized deductions, flatter tax brackets, etc.
Wait, what? When did that happen?
And did the "for equity debt" mean that it still applies to houses?
IIUC, income taxes have been unusually stable the last ~20 years.