Progressive Tax Rate Explanation
Progressive taxation works by taxing income within a certain bracket at different rates. For example:
| Bracket # | % tax rate within bracket | Min amount (exclusive) | Max amount (inclusive) |
|---|---|---|---|
| 1 | 10% | 0 | 50,000 |
| 2 | 20% | 50,000 | 60,000 |
| 3 | 25% | 60,000 | n/a (>60,000) |
In the example above, the taxes on 100,000 in income would be 17,000 (5,000 from bracket #1, 2,000 from bracket #2, and 10,000 from bracket #3).
I'm currently computing this as the dot product of two vectors (with a "zero" bracket of 0%/0 max): $$ ([\textrm{bracket 1 rate}, \textrm{bracket 2 rate}, \textrm{bracket 3 rate}]-[\textrm{bracket 0 rate}, \textrm{bracket 1 rate}, \textrm{bracket 2 rate}]) \cdot [max(0, \textrm{income}-\textrm{bracket 0 max}), max(0, \textrm{income}-\textrm{bracket 1 max}), max(0, \textrm{income}-\textrm{bracket 2 max})] $$
So, in the example above we do: $$ \begin{align} ([0.1, 0.2, 0.25]-[0, 0.1, 0.2]) \cdot [max(0, 100000-0), max(0, 100000-50000), max(0, 100000-60000)] \\ ([0.1, 0.1, 0.05]) \cdot [100000, 50000, 40000] \\ 100000*0.1+50000*0.1+40000*0.05 \\ 17000 \end{align} $$
Question
Using the progressive taxation formula above, we can get "take home pay" (income less taxes) by subtracting taxes from the income: $$ \begin{align} \textrm{take home pay} & = \textrm{income} - \left([\textrm{bracket 1 rate}, \textrm{bracket 2 rate}, \textrm{bracket 3 rate}]-[\textrm{bracket 0 rate}, \textrm{bracket 1 rate}, \textrm{bracket 2 rate}]) \cdot [max(0, \textrm{income}-\textrm{bracket 0 max}), max(0, \textrm{income}-\textrm{bracket 1 max}), max(0, \textrm{income}-\textrm{bracket 2 max})]\right) \end{align} $$
This means that in the example above, the post-tax "take home pay" is 83,000 (100,000 - 17,000).
I'm trying to solve this equation for income, so that I can plug in a given take home pay, and get the amount of pre-tax income I need to get that take home pay.
Any clue how to solve for income, or even approximate income necessary for a given take home pay?
Let $I$ be the total income and $P$ be take-home pay. Then the taxes paid is $T = I - P$, where $$T = \begin{cases} 0.1 I, & I \in [0, 50000] \\ 5000 + 0.2(I - 50000), & I \in (50000, 60000] \\ 7000 + 0.25(I - 60000), & I \in (60000, \infty). \end{cases}$$ Hence $$P = \begin{cases} 0.9 I, & I \in [0, 50000] \\ 0.8 I + 5000, & I \in (50000, 60000] \\ 0.75 I + 8000, & I \in (60000, \infty). \end{cases}$$ Now all that remains is to invert this piecewise function. We do this by solving each piece for $I$ and expressing the interval for each piece in terms of $P$. So for instance, $$P = 0.9I, \quad I \in [0, 50000]$$ implies that $$I = \frac{10}{9}P, \quad P \in [0, 45000].$$ The other cases are handled similarly; we obtain $$I = \begin{cases} \frac{10}{9}P, & P \in [0, 45000] \\ \frac{5}{4}(P - 5000), & P \in (45000, 53000] \\ \frac{4}{3}(P - 8000), & P \in (53000, \infty). \end{cases}$$ This furnishes the total income $I$ needed to earn a take-home pay of $P$.