Help with Vlookup on Taxes

Occasional Visitor

Trying to put one formula in the Taxes field, D8 using VLookup function.

Income tax is structured like this:

  1. AGI is taxed at 3% on the first $5,000
  2. AGI is taxed at 4% on the next $5,000
  3. AGI is taxed at 5% on the amount above $10,000

Total these 3 when AGI is over $10,000

Total only the first two when AGI is greater than $5,000 and less than $10,000

Total only the first one when AGI is less than $5,000

Thanks in advance for any help.