Show HN: Calculator for US individual income tax, from 1970-present
497 pointsAll 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
[2] https://taxsim.nber.org/
[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/
[6] https://github.com/tmm1/taxsim.app
[7] https://github.com/shanejorr/usincometaxes/pull/11
Comments (155) 41 threads
I'd love to get in touch. Will email you from max@policyengine.org.
[1] https://github.com/policyengine/openfisca-us
[2] https://policyengine.org/us
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?
https://taxfoundation.org/historical-income-tax-rates-bracke...
Politically, this setup seems to help keep those high-earners voting for lower taxes, which makes sense to them since they're the ones paying the highest overall rate.
Continue this thread — 10 replies
This is such a compelling narrative for the "taxes should be lower" crowd that I'm skeptical. Granted, this is my personal bias. But I would love to see the actual clear examples of how people are deducting like 50% of their income or whatever they'd need to bring their 70% marginal rate down to 35%.
Continue this thread — 1 reply
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.
Continue this thread — 12 replies
Continue this thread — 10 replies
One of the biggest was that there was an investment tax credit of 7% in the 60's and 10% in the 70's, which I believe was uncapped. I think those were also able to be rolled over to cover multiple years. That means that if you invested enough, you could pay essentially no taxes. This was repealed in 1986.
[edit] Another that I should probably mention is the treatment of asset depreciation; in the 1960's and 70's the government was incredibly generous with regards to asset depreciation. For example, they allowed more rapid depreciation so you can have assets fully depreciated while still within their useful life and potentially if you sold those would pay capital gains tax on them, meaning you reaped significant tax savings over the asset's lifetime.
Continue this thread — 2 replies
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)
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.
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.
All comments shown.
Couldn't load more comments. Check your connection and try again.