greetings Likvod Systems has been creating bespoke software for the water industry since 1995. The programs are tailor-made to suit your requirements.

The mystery of gross pay and nett pay

I have never really understood the Inland Revenue’s tax bands. As a mathematician, I would have made sure that every threshold was a multiple of 156, so that it could be divided by 12 (months) and 52 (weeks). That way, you could pay yourself the same gross amount each month, and the nett amount would be the same. But no, the nett amount keeps varying for the same gross amount. I use my own software to keep our accounts, and tweak the gross amount so that the nett amount comes to the same each month. This is a matter of trial and error, and is always a little tedious.

I wanted a way to enter the desired nett amount, and for it to calculate the gross amount. Looking at the way the two are related, I knew it would not be easy to just work backwards. I therefore decided on a successive approximation approach. It all works well. I now enter the nett amount required. It uses this as a gross amount, and calculates what the nett amount would be. The result will clearly be less than expected, so I add the difference between the required and the calculated nett amounts, and use that as the new gross amount. I do the same thing again, and the calculated nett amount will be nearer to what I want, but not quite there yet, so I add the new difference to the gross amount, and try again.

Result!

I perform this iteration as many times as necessary, in order to calculate the correct gross amount. Having written the code, I thought I had better check to see how many attempts it made to calculate various nett amounts. Admittedly, the testing was not exhaustive, but I have not yet found an amount that requires more than seven passes round the loop. Job done! Every time I use it, it makes me happy when I consider what is going on behind the scenes.

Bob Evens
Written by Bob Evens

Bob Evens is the Managing Director of Likvod Systems Ltd, and also serves as its principal engineer. He has a wide base of experience, having studied electrical engineering at Bristol University, and worked for a major supplier of Telemetry systems for twelve years. He programs in Delphi, Pascal, Sercal, Assembler and the odd bit of C and C++. He is also a qualified psychiatric nurse, and leads a local church congregation in Worksop.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.