In payroll period, define the income tax slabs as per the government rule. If there are any standard deductions provided by the government, that amount can also be added here.
If an employee has any kind of investments or tax declarations such as PPF, insurance, mutual funds, HRA, etc., add these in "Employee Tax Exemption Declaration". Screenshot attached:
While creating salary component of Income Tax, check the box "Variable Based On Taxable Salary". Ticking this checkbox means, income tax will be calculated automatically taking the payroll period and tax declarations into consideration.
Create a salary structure and add Income Tax in the deduction section leaving the amount section blank. Along with that kindly add Education cess which will be based on a formula. Screenshot attached:
Create a payroll entry and generate salary slips. Income tax will be calculated automatically along with education cess. Screenshot attached: