The rules for taxes although complicated, still seems can be expressed with lots of equalities and inequalities. For example, there are multiple rules on 401k contributions, and it seems to be just set of inequalities:<p>Let x be a 401k plan (the wording I'm using might not be correct)<p><pre><code> 1. employee contribution = after tax contribution + salary deferred
2. sum salary deferred over for all 401k plans <= 19500
3. salary deferral for plan x <= earned income from the company associated with x
4. employer contribution <= 0.25 \* earned income from the company
5. employer contribution + employee contribution <= 56000
6. there are lot more but looks like all can be expressed as some form of inequalities.
</code></pre>
The problem with all the tax software I know is that it is for tax reporting, not planning. It is a blackbox function. But if it can be expressed as a set of inequalities, it can help with tax planning as one can do optimization over it.<p>I did some search and it looks like people do use linear programming for international tax planning. https://www.ttn-taxation.net/pdfs/Speeches_NewYork_2012/N08-MiklosVasarhelyi.pdf<p>As another example, this tax planning related article about the long term capital gain bump would be very easy to incorporate into an optimization system(in fact, completely automatic) if we do have the system of inequalities in place.
https://www.kitces.com/blog/long-term-capital-gains-bump-zone-higher-marginal-tax-rate-phase-in-0-rate/
btw, took me a lot of time to figure this out. <a href="http://mathb.in/49229" rel="nofollow">http://mathb.in/49229</a><p>This is useful for people with multiple unrelated employers with 401k plans.