[<< | Prev | Index | Next | >>] Tuesday, June 10, 2025
Taxing Software
[income tax form filling with python]
I needed to run the calculations for a (non-existent) 2025 form 2210 in order to figure my estimated taxes (because I have the worst tax situation known to man, with YTD regular income going between positive and negative throughout the year...). But I couldn't find an easy way to do this for 2025, so I just cobbled my own together in python.
Me being me, I accidentally wrote the foundation of a full tax program. It generates official IRS pdfs, ready to print.
Defining new types of forms is easy. For the simple things, here's the entire implementation of line 4 of the 2210:
def l4(f): return f.l1 + f.l2 + f.l3And since it's python, you can get as sophisticated as you like. My library handles all the dependency considerations, across all forms, across all years, and in theory even between categories (it's not really limited to taxes). It also tracks how values were computed and displays that as hover pop-ups in the pdf.
A cross-form access looks like this:
def l7(f): return f._f1040_l18You can read that as "_" (hop up a level--i.e., outside this form) "f1040" (form 1040 in the same year as this form) "l18" (line 18). (I'm in the process of moving it to be more tags based, so that will likely become just f.f1040_l18, and you won't have to know or stick to a particular hierarchy.)
Once the form logic is defined, here's the user experience:
Not sure what to do with it from here. Open to ideas and collaborations.
[<< | Prev | Index | Next | >>]