HP Forums

Full Version: HP17BII+ - Help with writing Solve Equations...!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I have recently bought a 17BII+, superb(having owned a 10B since about 1994). I am grappling with writing a solve equation to calculate net income (after tax) by entering the gross income (before tax). The problem is UK tax has tiers at different rates, for instance 0-£5225 is 0%, next tier is £5226-£7545 at 10% and the next £7546-£39825 at 22% with everything above £39826 at 40%.

This has meant that it appears to be a lengthy formula using 'IF' and lots of parentheses. I have tried countless variations and the machine keeps saying "Invalid Equation". Any help/ thoughts please.

Many thanks

Will

My first thought is to check that your left and right parentheses match.

Any chance of posting your code?

Will, how about this:
NET=G*IF(G<5225:0:IF(G<7545:.1:IF(G<39285:.22:.4)))

Hi Will,

One method is to calculate the net income at each of the full steps and then add on the amount of net income at the highest bracket. A solver equation to do this is:

I=IF(G>39825:
32491.4+0.60*(G-39825):
IF (G>7545:
7313+0.78*(G-7545):
IF (G>5225:
5225+0.90*(G-5225):
G)))

Bill

Actually, I guess that would show tax, not net income. Try this instead:

NET=G*IF(G<5225:1:IF(G<7545:.9:IF(G<39825:.78:.6)))

Don, I think you are not "slicing" the income correctly. Each tear has its own tax rate. So, if your income is high enough, all tax rates come into play. Since the values for all tears but the highest applicable are constant, these values can be precomputed, as Bill shows in his equation.

I think this may be what is required as it slices up the salary.

INC=G
-0.10*IF(G>5225 AND G<7546:G-5225:IF(G>7525:7545-5225:0))
-0.22*IF(G>7545 AND G<39826:G-7545:IF(G>39825:39825-7545:0))
-0.40*IF(G>39825:G-39825:0)

I do hasten to add that I wrote this in Notepad and will try it later on my HP17BII+ when I finish work. A refinement would be to use L and G to fix the tax bands for when they change on a periodic basis.

Chris

Edited out some extra minuses and formatted!

Update. I have keyed it in and it does work as expected.


Edited: 3 Mar 2008, 12:37 p.m.

I see what you mean. Yes, you are right. The US does it differently.