Calculate gross salary when knowing the net salary and tax brackets Assume the annually gross salary is $100,000.
Tax brackets:


*

*0 - 50K - 10% = 5K in taxes

*50K - 70K - 20% = 4K in taxes

*70K - $90K - 30% = 6K in taxes

*90K and up - 40% = 4K in taxes


The income tax on 100K would be 19K.
So the net salary would be 81K.
However, knowing only the net salary (81K) and the tax brackets (1-4) how can I find out what was the gross salary?
Thank you very much.
UPDATE: Would the same rules apply if I have 2 level of brackets? For instance Federal and State income tax. Lets assume that the brackets are the same and Federal and State charge you the same amount on yeah tax bracket.
UPDATE 2: Actually I will combine Federal and State tax into one set of brackets and apply the same rule as it was one set of brackets.

consider net salary is x, now we will find out gross salary y

if x < 45000(0.9 * 50000)
y = x/0.9
end

if 45000 < x < 61000 (45000 + 0.8 * 20000)
y = 50000 + (x- 45000)/0.8
end

if 61000 < x < 75000 (61000 + 0.7 * 20000)
y = 70000 + (x - 61000)/0.7
end

if 75000 < x
y = 90000 + (x- 75000)/0.6
end

