TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Calculator for US individual income tax, from 1970-present

497 pointsby tmm1almost 3 years ago
I wanted to share a simple web app I created recently, which lets you estimate income taxes owed in the US: <a href="https:&#x2F;&#x2F;taxsim.app" rel="nofollow">https:&#x2F;&#x2F;taxsim.app</a><p>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&#x27; tax laws for each of the last 62 years.<p>I first learned about NBER TAXSIM [2] a few months ago via an interesting paper they published &quot;Automatic Tax Filing: Simulating a Pre-Populated Form 1040&quot; [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&#x2F;wasm version [4], thanks in huge part to previous open-source work [5].<p>This WASM build now powers <a href="https:&#x2F;&#x2F;taxsim.app" rel="nofollow">https:&#x2F;&#x2F;taxsim.app</a>, 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].<p>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&#x2F;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&#x27;s servers via ftp&#x2F;ssh&#x2F;http.<p>[1] <a href="https:&#x2F;&#x2F;taxsim.nber.org&#x2F;feenberg-coutts.pdf" rel="nofollow">https:&#x2F;&#x2F;taxsim.nber.org&#x2F;feenberg-coutts.pdf</a><p>[2] <a href="https:&#x2F;&#x2F;taxsim.nber.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;taxsim.nber.org&#x2F;</a><p>[3] <a href="https:&#x2F;&#x2F;www.nber.org&#x2F;papers&#x2F;w30008" rel="nofollow">https:&#x2F;&#x2F;www.nber.org&#x2F;papers&#x2F;w30008</a><p>[4] <a href="https:&#x2F;&#x2F;github.com&#x2F;tmm1&#x2F;taxsim.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tmm1&#x2F;taxsim.js</a><p>[5] <a href="https:&#x2F;&#x2F;chrz.de&#x2F;2020&#x2F;04&#x2F;21&#x2F;fortran-in-the-browser&#x2F;" rel="nofollow">https:&#x2F;&#x2F;chrz.de&#x2F;2020&#x2F;04&#x2F;21&#x2F;fortran-in-the-browser&#x2F;</a><p>[6] <a href="https:&#x2F;&#x2F;github.com&#x2F;tmm1&#x2F;taxsim.app" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tmm1&#x2F;taxsim.app</a><p>[7] <a href="https:&#x2F;&#x2F;github.com&#x2F;shanejorr&#x2F;usincometaxes&#x2F;pull&#x2F;11" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;shanejorr&#x2F;usincometaxes&#x2F;pull&#x2F;11</a>

41 comments

MaxGhenisalmost 3 years ago
Fantastic job making taxsim more accessible! We&#x27;ve built an open-source version of taxsim called OpenFisca US [1] which we expose in our (also open-source) web app, PolicyEngine US [2]. We haven&#x27;t yet implemented all of taxsim—we only have the most recent couple of years, and not all states—but we have some advantages like implementing means-tested benefits and being able to simulate custom tax and benefit reforms, both on individuals and the population (e.g. the budgetary and poverty impacts).<p>I&#x27;d love to get in touch. Will email you from max@policyengine.org.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;policyengine&#x2F;openfisca-us" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;policyengine&#x2F;openfisca-us</a><p>[2] <a href="https:&#x2F;&#x2F;policyengine.org&#x2F;us" rel="nofollow">https:&#x2F;&#x2F;policyengine.org&#x2F;us</a>
评论 #31928988 未加载
keehunalmost 3 years ago
Are all the dollar amounts in the simulated tax output at the top of the page inflation adjusted?<p>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?<p>Tangentially, did federal taxes really come down that much?
评论 #31926725 未加载
评论 #31926579 未加载
评论 #31929419 未加载
评论 #31927285 未加载
评论 #31926951 未加载
评论 #31926731 未加载
评论 #31930582 未加载
tick_tock_tickalmost 3 years ago
This seems beyond misleading it doesn&#x27;t even have a method to enter most of the now illegal methods to lower your tax bill.<p>Tax straddles were only banned in 1977 before that you should have easily been able to more then halve your tax bill with futures.
评论 #31926934 未加载
评论 #31932007 未加载
评论 #31929219 未加载
googlryasalmost 3 years ago
Very cool, especially hearing about the implementation.<p>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.
KerrAvonalmost 3 years ago
I wish this would get written up in mainstream media. Hypothesis being that if more people knew this existed, it would put additional pressure on Congress to simplify tax filing.
评论 #31926823 未加载
评论 #31927790 未加载
petercooperalmost 3 years ago
The US personal tax code looks extremely complicated to British eyes, but British people have a similar calculator at their disposal at <a href="https:&#x2F;&#x2F;listentotaxman.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;listentotaxman.com&#x2F;</a> though it only goes back to 2000.
评论 #31929939 未加载
评论 #31927590 未加载
emmelaichalmost 3 years ago
I wonder whether it would be easier to get Fortran in the browser with f2c (<a href="http:&#x2F;&#x2F;www.netlib.org&#x2F;f2c&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.netlib.org&#x2F;f2c&#x2F;</a>) then C to WASM.<p>I had excellent results with f2c on an old Fortran program when I used it.
评论 #31929320 未加载
madsbuchalmost 3 years ago
As a Danish person, it is a fun tool to play around with! Discovering that the tax difference between the US and Denmark is close to negligible is interesting as we have been known to have a high tax burden in Denmark.
FullyFunctionalalmost 3 years ago
That&#x27;s brilliant work, thanks!<p>Imagine if IRS would produce something like this (open sourced) and we could file our returns like this.
评论 #31926369 未加载
评论 #31926795 未加载
评论 #31928615 未加载
评论 #31926940 未加载
ideamotoralmost 3 years ago
This is amazing. Would there be a way to estimate future year taxes? For example, knowing past years inflation numbers could you run possible scenarios of future tax brackets?<p>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.<p>1: <a href="https:&#x2F;&#x2F;www.irs.gov&#x2F;newsroom&#x2F;irs-provides-tax-inflation-adjustments-for-tax-year-2022" rel="nofollow">https:&#x2F;&#x2F;www.irs.gov&#x2F;newsroom&#x2F;irs-provides-tax-inflation-adju...</a> (I’m uncertain whether this is based on some predetermined formula)
评论 #31927274 未加载
aidangrimshawalmost 3 years ago
Sort of tangentially, I&#x27;m working with other contributors on <a href="https:&#x2F;&#x2F;ustaxes.org" rel="nofollow">https:&#x2F;&#x2F;ustaxes.org</a>, an open source tax filing webapp <a href="https:&#x2F;&#x2F;github.com&#x2F;ustaxes&#x2F;UsTaxes" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ustaxes&#x2F;UsTaxes</a>.<p>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!
评论 #31928064 未加载
zeckalphaalmost 3 years ago
I made tiny typo (an extra digit in spouse age) and got a giant error, though at least it was actionable<p>“TAXSIM: Unbelievable spouse age”
评论 #31929426 未加载
refurbalmost 3 years ago
Didn’t take a close look but the 1986 (?) tax code update close major tax avoidance pathways (passive loses and tax shelters in wiki link).<p>I think one issue with calculators like this is it doesn’t account for excluding revenue that now has to be included.<p><a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Tax_Reform_Act_of_1986" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Tax_Reform_Act_of_1986</a>
interblagalmost 3 years ago
Bit late to the party but I just wanted to put one top level comment saying: this is awesome! I&#x27;d never have thought that putting a Fortran codebase like this into WASM was so possible. And doing so in this way surfaces great, battle-tested information, that would be herculean to reimplement and test in another language. Really awesome stuff!
lettergramalmost 3 years ago
The tax is not accurate historically, for higher income brackets. Prior to 2018(?) you could deduct the majority of your state income tax from the federal income tax (the &quot;Trump tax cuts&quot;).<p><a href="https:&#x2F;&#x2F;nypost.com&#x2F;2021&#x2F;10&#x2F;05&#x2F;court-upholds-trump-law-limiting-state-tax-deductions&#x2F;" rel="nofollow">https:&#x2F;&#x2F;nypost.com&#x2F;2021&#x2F;10&#x2F;05&#x2F;court-upholds-trump-law-limiti...</a><p>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)
评论 #31929200 未加载
novokalmost 3 years ago
Is there an option to add some cities or counties, like new york city&#x27;s local tax?
ngcc_hkalmost 3 years ago
I may be confused. I just talked with my kids about the problem of maintaining some old program in us gov particularly related to taxation. Possibly in assembly and last attempt to upgrade run out of budget and hence USA gov will forever have issue in maintaining it. People knew left and good luck to find my kid generation to learn those old thing.<p>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.<p>It is not a sim issue. It is not a pre-filled issue. It is a real issue.<p>Or my brief to my kid is wrong. It is about something else.
forrestthewoodsalmost 3 years ago
This is great. Could you add a box that displays effective tax rate and marginal rate?<p>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.
CSMastermindalmost 3 years ago
Would be helpful if there was a way to see a graph of how the amounts change over time.<p>I find myself putting in my info and then click minus on the years to see how the years change.
taxman135almost 3 years ago
The child tax credit calculation is incorrect for 2022+<p>It should not phase out at 150,000 anymore, but rather starting at 200,000 for single or 400,000 for married filing jointly.<p>Ref: <a href="https:&#x2F;&#x2F;sgp.fas.org&#x2F;crs&#x2F;misc&#x2F;IF11077.pdf" rel="nofollow">https:&#x2F;&#x2F;sgp.fas.org&#x2F;crs&#x2F;misc&#x2F;IF11077.pdf</a>
mNovakalmost 3 years ago
Cool use of emscripten. Is this handling inflation at all? Fixed-number items like standard deduction will be impacted by that.<p>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&#x2F;credits each year, which are difficult to include in this form.
meteralmost 3 years ago
I was curious to see how many kids it would take to lower my taxes to zero.<p>Apparently, you’re not allowed to have more than 15 dependents.
thatfrenchguyalmost 3 years ago
Why a 500k$ wages&#x2F;salaries limit here? :)
评论 #31926773 未加载
评论 #31926421 未加载
omarishalmost 3 years ago
This is really cool.. nicely done @tmm1. I&#x27;ve been meaning to dig into WASM and this is even more reason to do so.
divbzeroalmost 3 years ago
This is great. I would also love to see a graph of the federal tax over time from 1960 to today.
bradgessleralmost 3 years ago
This is great!<p>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.
minhazmalmost 3 years ago
This calculator doesn&#x27;t seem to support local income taxes, which many states have [1]. For example Maryland has income tax brackets than other states, but each county levies its own income tax on top of that. I usually use smartasset&#x27;s income tax calculator [2], which also asks for your location so it can factor in any local income taxes as needed.<p>[1] <a href="https:&#x2F;&#x2F;www.thebalance.com&#x2F;cities-that-levy-income-taxes-3193246" rel="nofollow">https:&#x2F;&#x2F;www.thebalance.com&#x2F;cities-that-levy-income-taxes-319...</a> [2] <a href="https:&#x2F;&#x2F;smartasset.com&#x2F;taxes&#x2F;income-taxes" rel="nofollow">https:&#x2F;&#x2F;smartasset.com&#x2F;taxes&#x2F;income-taxes</a>
评论 #31927361 未加载
guiltygodsalmost 3 years ago
This is really great. Can you please add Net Income after calculation. That would be useful.
raptortechalmost 3 years ago
This is awesome! Two features requests:<p>1. A plot over time<p>2. Could you adjust the income for inflation, so when you click back 1yr your income goes down accordingly?
jrockwayalmost 3 years ago
This is very interesting. I learned that the last year I made enough money to pay AMT is the year they got rid of AMT. Damn!
评论 #31927146 未加载
Aeolunalmost 3 years ago
My tax was 50% higher in 1988 than in 2020. Did taxes really come down to this extend over the past 30 years?
评论 #31928918 未加载
zild3dalmost 3 years ago
Was hoping it would adjust today&#x27;s income for inflation going back with a chart over time
moneywoesalmost 3 years ago
How do we know how many percent of people paid tax during these times
idomialmost 3 years ago
How is this different than turbotax for instance?
1270018080almost 3 years ago
A slider for inputting multi digit numbers? Pain.
cyrusthegreatalmost 3 years ago
This is awesome! Permanently bookmarked!
alexb_almost 3 years ago
This is really cool, but I have to say that sliders are the absolute worst way to input income and benefits. Why not just use a simple textbox?
评论 #31928960 未加载
thechaoalmost 3 years ago
Why is the income limited to 500000$?
jdasdfalmost 3 years ago
It&#x27;s all blank for me
mgarfiasalmost 3 years ago
BADASS THANK YOU
dmtroyeralmost 3 years ago
come again?