TITLE: Equation for reducing leave to zero
QUESTION [5 upvotes]: I'm not a mathematician at all, but I'm looking for a formula that will help with the following problem:
It's coming up to Christmas and our employees want to take leave, but some employees will have accrued less leave than than the amount they wish to take in which case they are entitled to take all of their leave and the rest will be unpaid leave.
The problem is, that for every hour of leave paid to an employee, they are entitled to accrue an additional 0.038462 hours of leave, so as they take leave, they also accrue leave, which in turn they are entitled to take. The problem is, this makes it very hard to work out how much leave to give them so that their leave balance comes to 0
To give an example, I have an employee that currently has 10 hours leave but wants to take 20 hours all up.
Since he takes 10 hours leave, he will accrue 10 x 0.038462 in leave for that pay run. So he's actually is entitled to take 10.38462 hours leave.
So I change his leave taken to be 10.38462, but that means he accrues an additinal 0.0147932 hours of leave which you add on to the 10.38462 which then accrues another amount of leave and so on.
So what I'm wondering is, if there's a formula that I could use to work out how much leave an employee could be paid given that every time they take leave, an additional amount of leave is accrued?

REPLY [4 votes]: Yes. Multiply the number of hours by 1.04.
For every one hour of leave, an employee gains an additional $x$ hours ($x$ being 0.038462 in this case). And for these $x$ hours of additional leave, the employee gains an additional $x \times x = x^2$ hours of leave, and so on.
So an employee entitled to $N$ hours of leave can actually take
$$N(1 + x + x^2 + x^3 + ...)$$
hours. This is called a Taylor series. As long as $-1 \le x \le +1$, it adds up to
$$\frac{N}{1 - x}$$
For $x$ = 0.038462, this comes out as very close to 1.04. So close, in fact, that I expect 1.04 is the exact figure, and the number you've been using is actually an approximation of $1 - \frac{1}{1.04}$.

REPLY [3 votes]: Let $x$ be the amount of leave they end up taking and $a$ the amount they have already accrued.  Their total leave $x$ should be the leave they already have plus the leave they will accrue while on leave, so
$$x = a + 0.038462x$$
You can solve this for $x$ to get
$$x = \frac{a}{1 - 0.038462}$$