Reimbursement formula

Let’s assume that you work at an awesome company as a contractor.
They allow you to purchase equipment, and will reimburse the money you spent.

However, as a freelancer, you have to pay taxes. Let’s assume taxes are at 10% for any payment you receive on your account.

To further increase the greatness of the company, they say they will pay the taxes for you as long as you do the proper calculation.

So, as an example, let’s say you spend like $100 on computer equipment and ask for $100 reimbursement.
You will receive $100 on your bank account and have to pay 10% of that in taxes, so that’s $10, so you end up with $90.

You might also try to ask for $110 from the company, but 10% of that is $11 so you are left with $99. If you ask them to send you $11 for the taxes you paid, you will again have to pay 10% of $11 ($1.1) in taxes, and so on.

So the question is, how much money should the company reimburse you once, so that you get an amount close to the one you spent which includes taxes?

The answer is, if N is the money spent, you need to ask for reimbursement of N + \lceil \frac{N}{9} \rceil money.

As an example:

I spend: $100
They send: N + \lceil \frac{N}{9} \rceil, or $112
I pay tax: 10% * $112 = $11.2

Now, it holds that \$112 = Send \geq Spend + Tax = \$111.2

To derive that formula, we need to think in terms of recursion. Consider that multiple transactions are made, and for each transaction, you need to pay 10% in taxes of the transaction value.

Start with a number N:
1. Ask for pay of N money (company reimburses N)
2. Ask for pay of 10% of N (company reimburses 10% of N)
3. Ask for pay of 10% of 10% of N (company reimburses 10% of 10% of N)

And then, sum all the terms.

That makes something like: S = N + N/10 + N/100 + ... = N(1 + 1/10 + 1/100 + ...).

To calculate the 1 + 1/10 + 1/100 + ... part, we can let n = 1.1111.... So, 10n = 11.1111... and 10n - n = 9n = 10 and we get that n = 10/9. We rewrite that as 1 + 1/9 so that we can use ceil on the fractional part to get an integer.

P.S. I work at Automattic 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s