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
Earlier comments1. 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?
Since 1987, whenever you originate or re-finance any mortgage, the portion of the proceeds used to buy, build, or improve your personal residence is called "acquisition debt" (used to acquire the asset), and the remaining portion is called "equity debt" since it is secured solely by the pre-existing equity in the property and is used for anything other than acquisition.
When you re-finance acquisition debt, it remains acqusition debt, but any cash-out from the re-finance not used to buy/build/improve is equity debt. As you pay down principal on the loan, you are considered to first pay off the equity debt, before acquisition debt.
Continue this thread — 1 reply
IIUC, income taxes have been unusually stable the last ~20 years.
All comments shown.
Couldn't load more comments. Check your connection and try again.