How to calcaulate new Tax Regime in uipath

hi,
how to calculate income tax below slab rates

for new tax regime upto 12,00,000 tax free , but if cross 12 laks the above tax rates apply.

example my salary income 30,00,000 it showing 4,75,800 below screen shot

how to calculate this ? can anyone help ?

@Anand_Designer

basically you need to include all your given conditions above to the input number

use if conditions to check each condition and accordingly add the amount and get the total tax

for example if salary < 4 lakhs in then give tax as 0 in else check if < 8 and if not calculate the tax for amount (input - 4 lakhs)*0.5 is the tax amount..similarly continue for each case

cheers

cheers

Here is simple pseudocode for tax calculation

FUNCTION CalculateNewTaxRegime(grossIncome, isSalaried)

    SET standardDeduction = 0

    IF isSalaried THEN
        standardDeduction = 50000
    ENDIF

    SET taxableIncome = grossIncome - standardDeduction

    IF taxableIncome <= 0 THEN
        RETURN 0
    ENDIF

    // Slab-wise income tax initialization
    SET tax = 0

    // Apply slab rates from top to bottom
    IF taxableIncome > 1500000 THEN
        tax += (taxableIncome - 1500000) * 0.30
        taxableIncome = 1500000
    ENDIF

    IF taxableIncome > 1200000 THEN
        tax += (taxableIncome - 1200000) * 0.20
        taxableIncome = 1200000
    ENDIF

    IF taxableIncome > 900000 THEN
        tax += (taxableIncome - 900000) * 0.15
        taxableIncome = 900000
    ENDIF

    IF taxableIncome > 600000 THEN
        tax += (taxableIncome - 600000) * 0.10
        taxableIncome = 600000
    ENDIF

    IF taxableIncome > 300000 THEN
        tax += (taxableIncome - 300000) * 0.05
        taxableIncome = 300000
    ENDIF

    // Section 87A rebate: If net taxable income <= 7 lakh, rebate up to ₹25,000
    SET totalBeforeCess = tax
    IF grossIncome - standardDeduction <= 700000 THEN
        rebate = MIN(tax, 25000)
        tax = tax - rebate
    ENDIF

    // Health & Education Cess: 4% on tax
    SET cess = tax * 0.04

    // Final tax payable
    SET totalTax = tax + cess

    RETURN totalTax
END FUNCTION

Hope this helps. :slight_smile:

In UiPath, to automate this tax calculation, first input the gross salary and deduct the standard deduction (₹75,000 for salaried). Check if the taxable income exceeds ₹12,75,000. If not, set tax to zero. If above, apply the new regime tax slabs starting from ₹4 lakh, summing each slab’s tax. Exclude the Section 87A rebate for incomes above ₹12 lakh. Add 4% health and education cess to the computed tax. Display the final tax amount. Use conditional logic for marginal relief if taxable income is just above the threshold, ensuring compliance with the latest rules