taxcal
/* Function to calculate Income tax
input is taxable income.
Function created on 3rd September 2014
Function created by Shubharaj Buwa
*/
function tax(input) {
if (input < 250001) {
return “0”;
}
else if (input > 250000 && input < 500001) {
return ((input – 250000)* 5 /100);
}
else if (input > 500000 && input < 1000001) {
return ((input-500000) * 20/100)+12500 ;
}
else if (input > 1000000) {
return ((input – 1000000) * 30/100) + 112500;
}
}