Settings

Theme

Ask HN: Open source tax calculator?

12 points by zyncl19 7 years ago · 4 comments · 1 min read


I want to create a budget application for my own personal use cases. I'd like to be able to calculate both withholding and end of the year taxes. Are there any open source libraries that would help me do this? I'd prefer python or C++, but would work with any language.

Jtsummers 7 years ago

I wrote a withholdings calculator in Excel for myself this past year, I can try to clean it up and post it somewhere. I also developed it to the point that it gives me a very accurate estimate of my final tax refund/owed amount (I added fields to allow me enter interest, dividend, and other income). [0] describes the withholding tables for 2019. Income tax withholding starts on page 44 and is the most relevant. Social security is 6.2% of income up to $132,900 (0% over that) and Medicare is 1.45%. It's actually a pretty straightforward task to produce regardless of language.

Those plus your local state income tax withholding tables should be enough to get started on making something like this yourself.

The open tax solver linked looks good, but their payroll calculator assumes weekly pay which will get you in the ballpark but won't be accurate if you are paid less frequently (you can't even just double its numbers for biweekly pay, due presumably to rounding issues).

Py1040 looks ok as a start but will also only cover your end of year tax situation. It's also using hardcoded tax tables which is unfortunate since they seem to have been last changed in 2016 and so is wrong for 2018 and forward. Using external tables to drive it would make it much easier to update.

The IRS Withholding calculator will, of course, be very accurate but you can't really embed it into anything else. And if your tax situation is simpler you can elide a lot of details.

[0] https://www.irs.gov/pub/irs-pdf/p15.pdf

ksherlock 7 years ago

Is the IRS Withholding calculator good enough?

https://www.irs.gov/individuals/irs-withholding-calculator

BasicObject 7 years ago

http://opentaxsolver.sourceforge.net/

plg 7 years ago

https://github.com/b-k/py1040

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection