Hacker News new | ask | show | jobs
by FullyFunctional 1458 days ago
That's brilliant work, thanks!

Imagine if IRS would produce something like this (open sourced) and we could file our returns like this.

4 comments

The IRS can already calculate your taxes for you. In other countries you just have to confirm what the revenue department calculates as your liability and hit "submit". You have to do the calculations yourself because TurboTax et al., and accountants lobbied so taxes are complicated and must be completed by the filer (or their accountant).
From the abstract of NBER paper I mentioned [1]:

> 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...

One problem is that information is not tabulated by the IRS in time for a mid-April return date.

Order your tax “transcript of account” in late March and again in late August. It’ll be substantially more complete in late August.

I didn't point that out: I originate from a country in which I used to get a postcard summarizing what they thought I owed with a "Yes, I agree" checkbox and a field to sign. You could always file an extensive return if desired, but unless you had complicated (notably international) transactions, the return was basically accurate.

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.

The US demands extremely detailed tracking of your income. We just get nothing in return for it.
>We just get nothing in return for it.

Maybe you don't, but a lot of wealthy people who can afford to hire tax professionals do. For example, how certain famous billionaires[0] have received billions of tax free income because they took the position that it could be classified as a certain type of income.

[0]https://www.bloomberg.com/news/articles/2021-06-24/peter-thi...

I am from the country where most people don't even have to agree to anything - their income taxes already handled by employer on behalf of the government before each paycheck. But there is very low trust in government and it is dictatorship...

I do not know if that was intentionally forced on citizens in the USA to do their own taxes (even tho IRS had accurate information from W3s for nearly half of payers) for that purpose, but I think such exposure to the behind scenes calculation of taxes might force citizens to be more aware of what they are paying.

For example, back to my home country - I think income tax is something like 11% or 13% today. And most folks see this tax on their pay stubs. But what they do not see (although some are aware of) - employer pays extra 36% of the salary into social security. In the USA employee sees at least half of it (6.20% of 12.40%). The health insurance premiums are also prominent on the tax return, same with retirement. None of that is visible in any form to employees in my home country.

> The IRS can already calculate your taxes for you

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 much as I hate doing it now the first few years I did my taxes I went all paper and it really helped give me a foundational understanding of it all. Especially when you make that one typo.
NBER's biggest contributors are the US government. Ironically, the IRS isn't one of them.[1]

As an aside, I'd love to see US gov research grants start requiring the work product to be made open source.

[1]: https://www.nber.org/about-nber/support-funding

Agreed. We're building an open source version of taxsim (plus benefit rules) at https://github.com/policyengine/openfisca-us.
Congress won't let the IRS do it. To avoid that, Turbo Tax and the others promised to give free filing software out. That it didn't have all the deductions (pay for that) and was filled with anti-patterns to get people to sign up was something Congress ignored.

I assume there were also some campaign contributions that changed hands.

Imagine if the tax code itself were written in Python.

  def computeTax(**kwargs):
    .. blah blah ..
    return how_much_you_owe
Of course we all know what comes next...

  from scipy.optimize import minimize
In 2014, the Policy Simulation Library [1] added a model called Tax-Simulator [2], which is a Python reimplementation of TAXSIM [3][4]. It is available as open-source [5], and designed to let researchers both change existing policy variables and implement new tax reforms in Python.

[1] https://pslmodels.org/

[2] https://taxcalc.pslmodels.org/

[3] https://taxcalc.pslmodels.org/about/history.html

[4] https://github.com/PSLmodels/Tax-Calculator/blob/master/taxc...

[5] https://github.com/PSLmodels/Tax-Calculator

My team at PolicyEngine [1] is also now further reimplementing Tax-Calculator in the Python-based OpenFisca framework [2]. OpenFisca US [3] includes all tax logic in Tax-Calculator, plus many means-tested benefit programs like SNAP, and some state tax logic (currently only Massachusetts is complete, though we'll finish the country in the next 12-18 months). You can try it in our PolicyEngine US web app [4].

(OpenFisca US is part of the Policy Simulation Library, and it's developed by a number of former Tax-Calculator developers, myself included.)

[1] https://policyengine.org

[2] https://openfisca.org

[3] https://github.com/policyengine/openfisca-us

[4] https://policyengine.org/us

France has an open source implementation of their tax code [0]. The paper [1] gives an overview of the implementation language, mlang.

[0] https://github.com/MLanguage/mlang [1] https://arxiv.org/abs/2011.07966

France has also developed the OpenFisca framework [1] for tax and benefit rules as code, and its OpenFisca France [2] model is widely used (I think significantly more than mlang). We've extended it to the UK [3] and the US [4].

[1] https://openfisca.org

[2] https://github.com/openfisca/openfisca-france

[3] https://github.com/policyengine/openfisca-uk

[4] https://github.com/policyengine/openfisca-us

`policy_current_law.json` is really interesting:

https://github.com/PSLmodels/Tax-Calculator/blob/master/taxc...

Looks like the data in there goes back to 2013/2014. I'd love to see older historical policy data.

It has been proposed in professional tax forums that this is in fact how tax code should be legislated, using some kind of pseudo-code. Even just using symbols for things such as >=, <, and so on would eliminate a lot of the garbage in the verbal version.
This would be incredible -- it feels like the tax form documentation is written in a dialect of Accounting English from the 50s, and just little things like adding some parentheses to group and/or con/disjunctions would go a long ways.

Nearly every year I don't feel confident that I've filled out my taxes accurately, and it's not for lack of trying.