How to calculate tax for custom amount?