<!DOCTYPE html>
<html lang="en">
    <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta content=" 7th CPC (Central Pay Commission Salary Calculator for Central Govt employee, faculty of IIT, NIT, IIM, Central Universities etc, salary calculator for faculty, teaching staff of IIT, NIT, IIIT, IISER, IIM,SPA, Central University, NIFT,
salary calculator for faculty teaching staff of IIT, salary calculator for faculty teaching staff of NIT, salary calculator for faculty teaching staff of IIIT, salary calculator for faculty teaching staff of IISER, salary calculator for faculty teaching staff of IIM, salary calculator for faculty teaching staff of SPA, salary calculator for faculty teaching staff of NIFT, salary calculator for faculty teaching staff of Central University, salary calculator for central government employee
               
               
" name="keywords"></meta>

    <style>
        .tntable {
            border: 1px solid #020103;
            border-collapse: collapse;
            padding: 5px;
            box-shadow: 5px 5px 5px #888888;
            text-align: center;
            width: 100%;
            margin-bottom: 20px;
        }

        .tntable th {
            border: 1px solid #020103;
            padding: 5px;
            background: #9704e6;
            color: white;
            text-align: center;
        }

        .tntable td {
            border: 1px solid #020103;
            padding: 5px;
            background: #FFFFFF;
        }

        select, button1 {
            width: 100%;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            background-color: #f9f9f9;
        }

        button1 {
            background-color: #4CAF50;
            color: white;
            border: none;
            cursor: pointer;
        }

        button1:hover {
            background-color: #45a049;
        }

        .result {
            display: none;
        }

        h2 {
            color: #333;
            margin-bottom: 20px;
        }

        .centered {
            text-align: center;
        }

        .input {
            margin: 5px;
            display: inline-block;
        }

        .error_msg {
            color: red;
        }

        .tntable {
            width: 100%;
            border-collapse: collapse;
        }

        .tntable th, .tntable td {
            border: 1px solid #ddd;
            padding: 8px;
        }

        .hidden {
            display: none;
        }
    </style>
</head>
<body>

    <table class="tntable">
        <colgroup>
            <col style="width: 65%;">
            <col style="width: 35%;">
        </colgroup>
        <tr>
            <th colspan="2">7th CPC Salary Calculator</th>
        </tr>
        <tr>
            <td>Select your Pay Level <small> (AGP: Faculty, GP: All Other Employee)</small></td>
            <td>
                <select id="level" onchange="levelChanged(this)">
                    <option value="-1">Select...</option>
                    <option value="1">Level 1 (GP – 1800)</option>
                    <option value="2">Level 2 (GP – 1900)</option>
                    <option value="3">Level 3 (GP – 2000)</option>
                    <option value="4">Level 4 (GP – 2400)</option>
                    <option value="5">Level 5 (GP – 2800)</option>
                    <option value="6">Level 6 (GP – 4200)</option>
                    <option value="7">Level 7 (GP – 4600)</option>
                    <option value="8">Level 8 (GP – 4800)</option>
                    <option value="9">Level 9 (GP – 5400)</option>
                    <option value="10">Level 10 (GP – 5400)</option>
<option value="AGP_10">Level AGP_10 (AGP – 6000)</option>                  
                    <option value="11">Level 11 (GP – 6600)</option>
<option value="AGP_11">Level AGP_11 (AGP – 7000)</option>                    
                    <option value="12">Level 12 (GP – 7600)</option>
<option value="AGP_12_IIT_NIT">Level AGP_12 IIT/NIT etc (AGP – 8000)</option>
<option value="AGP_12_UGC_etc">Level AGP_12 UGC etc (AGP – 8000)</option>                   
                    <option value="13">Level 13 (GP – 8700)</option>
                    <option value="A_13">Level 13A (GP – 8900)</option>
<option value="AGP_13_A_A1">Level AGP 13_A/A1 (AGP – 9000)</option>
<option value="AGP_13_A2">Level AGP_13A2 (AGP – 9500)</option>                   
    
                    <option value="14">Level 14 (GP – 10000)</option>
   <option value="AGP_14">Level AGP_14 (AGP – 10000)</option>
       <option value="AGP_14A">Level AGP_14A (AGP – 10500)</option>
        <option value="AGP_15">Level AGP_15 (HAG)</option>                     
                         
 

   
     

   
                </select>
            </td>
        </tr>
        <tr>
            <td>Select Basic Pay  </td>
            <td>
                <select id="basic">
                    <option value="0">Select...</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>Select the type of your City for HRA</td>
            <td>
                <select id="hracity">
                    <option value="0">No HRA</option>
                    <option value="X">X City (30%)</option>
                    <option value="Y">Y City (20%)</option>
                    <option value="Z">Z City (10%)</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>Select the type of your City for TA</td>
            <td>
                <select id="tacity">
                    <option value="0">No TA</option>
                    <option value="1">Higher TPTA Cities</option>
                    <option value="2">Other Cities</option>
                </select>
            </td>
        </tr>
        
        
        <tr>
    <td>Select DA Percentage</td>
    <td>
        <select id="daPercentage">
            <option value="0.53" selected>53% (Current July 2024)</option>
            <option value="0.56" >56% (Expected Jan 2025)</option>
            <option value="0.57">57% (Expected Jan 2025)</option>
        </select>
    </td>
</tr>

        
        
        
        
        <tr>
            <td colspan="2" style="text-align: right;">
                <button onclick="calculate()">Calculate</button>
            </td>
        </tr>
    </table>

    <table class="tntable result" id="result" style="display: none;">
        <colgroup>
            <col style="width: 65%;">
            <col style="width: 35%;">
        </colgroup>
        <tr>
            <th colspan="2">Salary from July 2024 (per month)</th>
        </tr>
        <tr>
            <td>Your Pay Level</td>
            <td><label id="selected-level"></label></td>
        </tr>
        <tr>
            <td>Basic Pay</td>
            <td><label id="selected-pay"></label></td>
        </tr>
        <tr>
            <td>DA <small>( Dearness Allowance)</small></td>
            <td><label id="da"></label></td>
        </tr>
        <tr>
            <td>HRA <small>(revised HRA when DA crosses 50%)*</small></td>
            <td><label id="hra1"></label></td>
        </tr>
        <tr>
            <td>TA <small>(Travelling Allowance)</small></td>
            <td><label id="ta"></label></td>
        </tr>
        <tr>
            <td>Other Allowances/Incomes (if any) <div id="allowanceGroup">
                    <button id="addAllowanceButton" onclick="addAllowance()">Add Allowance</button>
                    <button id="removeAllowanceButton" onclick="removeAllowance()">Remove Allowance</button>
                </div><div id="allowanceFields"></div></td>
            <td>
                
                <div id="allowanceSum">Total Allowances: ₹0</div>
            </td>
        </tr>
        <tr>
            <th>Gross Salary</th>
            <th><label id="total"></label></th>
        </tr>
        <tr>
            <td>NPS Contribution <input type="checkbox" id="include-nps" checked onchange="calculate()"></td>
            <td><label id="nps"></label></td>
        </tr>
        <tr>
            <td>CGHS Contribution <input type="checkbox" id="include-cghs" checked onchange="calculate()"></td>
            <td><label id="cghs-contribution"></label></td>
        </tr>
        <tr>
            <td>Income Tax (New Regime) <input type="checkbox" id="new-regime" name="tax-regime" value="new" checked onchange="calculate()">
            </br> 
            <label id="incometaxAn"></label> <small><i>(approx) per annum</i></small>
            
            </td>
            <td><label id="income-tax"></label><small><i>(approx)</i></small></td>
        </tr>
        <tr>
            <td>Other Deductions (if any) <div id="deductionGroup">
                    <button id="addDeductionButton" onclick="addDeduction()">Add Deduction</button>
                    <button id="removeDeductionButton" onclick="removeDeduction()">Remove Deduction</button>
                </div>
                <div id="deductionFields"></div></td>
            <td>
                
                
                <div id="deductionSum">Total Deductions: ₹0</div>
            </td>
        </tr>
        <tr>
            <th>Net Salary</th>
            <th><label id="net-salary"></label></th>
        </tr>
        
        
        
     <tr> <td>  
        <label for="annualIncomeInput">Enter Annual Income<small> (to know actual Income Tax-new regime):</small> </label>
    <input type="number" id="annualIncomeInput" placeholder="Enter your annual income" />
</td><td> 
    <p id="annualIncomeTaxOutput"></p>
    <p id="monthlyIncomeTaxOutput"></p></td>
</tr>
        
        
    </table>

    <script>
        var payLevels = {
              1: [18000, 18500, 19100, 19700, 20300, 20900, 21500, 22100, 22800, 23500, 24200, 24900, 25600, 26400, 27200, 28000, 28800, 29700, 30600, 31500, 32400, 33400, 34400, 35400, 36500, 37600, 38700, 39900, 41100, 42300, 43600, 44900, 46200, 47600, 49000, 50500, 52000, 53600, 55200, 56900,],
                2: [19900, 20500, 21100, 21700, 22400, 23100, 23800, 24500, 25200, 26000, 26800, 27600, 28400, 29300, 30200, 31100, 32000, 33000, 34000, 35000, 36100, 37200, 38300, 39400, 40600, 41800, 43100, 44400, 45700, 47100, 48500, 50000, 51500, 53000, 54600, 56200, 57900, 59600, 61400, 63200,],
3: [21700, 22400, 23100, 23800, 24500, 25200, 26000, 26800, 27600, 28400, 29300, 30200, 31100, 32000, 33000, 34000, 35000, 36100, 37200, 38300, 39400, 40600, 41800, 43100, 44400, 45700, 47100, 48500, 50000, 51500, 53000, 54600, 56200, 57900, 59600, 61400, 63200, 65100, 67100, 69100,],
4: [25500, 26300, 27100, 27900, 28700, 29600, 30500, 31400, 32300, 33300, 34300, 35300, 36400, 37500, 38600, 39800, 41000, 42200, 43500, 44800, 46100, 47500, 48900, 50400, 51900, 53500, 55100, 56800, 58500, 60300, 62100, 64000, 65900, 67900, 69900, 72000, 74200, 76400, 78700, 81100,],
5: [29200, 30100, 31000, 31900, 32900, 33900, 34900, 35900, 37000, 38100, 39200, 40400, 41600, 42800, 44100, 45400, 46800, 48200, 49600, 51100, 52600, 54200, 55800, 57500, 59200, 61000, 62800, 64700, 66600, 68600, 70700, 72800, 75000, 77300, 79600, 82000, 84500, 87000, 89600, 92300,],
6: [35400, 36500, 37600, 38700, 39900, 41100, 42300, 43600, 44900, 46200, 47600, 49000, 50500, 52000, 53600, 55200, 56900, 58600, 60400, 62200, 64100, 66000, 68000, 70000, 72100, 74300, 76500, 78800, 81200, 83600, 86100, 88700, 91400, 94100, 96900, 99800, 102800, 105900, 109100, 112400,],
7: [44900, 46200, 47600, 49000, 50500, 52000, 53600, 55200, 56900, 58600, 60400, 62200, 64100, 66000, 68000, 70000, 72100, 74300, 76500, 78800, 81200, 83600, 86100, 88700, 91400, 94100, 96900, 99800, 102800, 105900, 109100, 112400, 115800, 119300, 122900, 126600, 130400, 134300, 138300, 142400,],
8: [47600, 49000, 50500, 52000, 53600, 55200, 56900, 58600, 60400, 62200, 64100, 66000, 68000, 70000, 72100, 74300, 76500, 78800, 81200, 83600, 86100, 88700, 91400, 94100, 96900, 99800, 102800, 105900, 109100, 112400, 115800, 119300, 122900, 126600, 130400, 134300, 138300, 142400, 146700, 151100,],
9: [53100, 54700, 56300, 58000, 59700, 61500, 63300, 65200, 67200, 69200, 71300, 73400, 75600, 77900, 80200, 82600, 85100, 87700, 90300, 93000, 95800, 98700, 101700, 104800, 107900, 111100, 114400, 117800, 121300, 124900, 128600, 132500, 136500, 140600, 144800, 149100, 153600, 158200, 162900, 151100,],
10: [56100, 57800, 59500, 61300, 63100, 65000, 67000, 69000, 71100, 73200, 75400, 77700, 80000, 82400, 84900, 87400, 90000, 92700, 95500, 98400, 101400, 104400, 107500, 110700, 114000, 117400, 120900, 124500, 128200, 132000, 136000, 140100, 144300, 148600, 153100, 157700, 162400, 167300, 172300, 177500,],
11: [67700, 69700, 71800, 74000, 76200, 78500, 80900, 83300, 85800, 88400, 91100, 93800, 96600, 99500, 102500, 105600, 108800, 112100, 115500, 119000, 122600, 126300, 130100, 134000, 138000, 142100, 146400, 150800, 155300, 160000, 164800, 169700, 174800, 180000, 185400, 191000, 196700, 202600, 208700],
12: [78800, 81200, 83600, 86100, 88700, 91400, 94100, 96900, 99800, 102800, 105900, 109100, 112400, 115800, 119300, 122900, 126600, 130400, 134300, 138300, 142400, 146700, 151100, 155600, 160300, 165100, 170100, 175200, 180500, 185900, 191500, 197200, 203100, 209200, 185400, 191000, 196700, 202600, 208700,],
13: [123100, 126800, 130600, 134500, 138500, 142700, 147000, 151400, 155900, 160600, 165400, 170400, 175500, 180800, 186200, 191800, 197600, 203500, 209600, 215900,],
A_13: [131100, 135000, 139100, 143300, 147600, 152000, 156600, 161300, 166100, 171100, 176200, 181500, 186900, 192500, 198300, 204200, 210300, 216600, ],
14: [144200, 148500, 153000, 157600, 162300, 167200, 172200, 177400, 182700, 188200, 193800, 199600, 205600, 211800, 218200,],
           
 AGP_10: [57700, 59400, 61200, 63000, 64900, 66800, 68800, 70900, 73000, 75200, 77500, 79800, 82200, 84700, 87200, 89800, 92500, 95300, 98200,],
AGP_11: [68900, 71000, 73100, 75300, 77600, 79900, 82300, 84800, 87300, 89900, 92600, 95400, 98300, 101200, 104200, 107300, 110500, 113800, 117200,],
AGP_12_IIT_NIT: [101500, 104500, 107600, 110800, 114100, 117500, 121000, 124600, 128300, 132100, 136100, 140200, 144400, 148700, 153200, 157800, 162500,166400,],
AGP_12_UGC_etc: [79800,82200,84700,87200,89800,92500,95300,98200,101100,104100,107200,110400,113700,117100,120600,124200,127900,131700,],


AGP_13_A_A1: [131400, 135300, 139400, 143600, 147900, 152300, 156900, 161600, 166400, 171400, 176500, 181800, 187300, 192900, 198700,204700,],
AGP_13_A2: [139600, 143800, 148100, 152500, 157100, 161800, 166700, 171700, 176900, 182200, 187700, 193300, 199100, 205100, 211300,],
AGP_14: [144200, 148500, 153000, 157600, 162300, 167200, 172200, 177400, 182700, 188200, 193800, 199600, 205600,211800,],
AGP_14A: [159100, 163900, 168800, 173900, 179100, 184500, 190000, 195700, 201600, 207600, 213800, 220200,],
AGP_15: [182200, 187700, 193300, 199100, 205100, 211300, 217600, 224100,],
        };

        function levelChanged(selectElem) {
            var level = selectElem.value;
            var basicArray = payLevels[level] || [];
            var $basicSelect = document.getElementById('basic');

            $basicSelect.innerHTML = '<option value="0">Select...</option>';
            for (var i = 0; i < basicArray.length; i++) {
                var option = document.createElement('option');
                option.value = basicArray[i];
                option.text = basicArray[i];
                $basicSelect.appendChild(option);
            }
        }

        let allowanceCount = 0;
        let deductionCount = 0;
        const maxFields = 10;

        function addAllowance() {
            if (allowanceCount < maxFields) {
                const container = document.getElementById('allowanceFields');
                
                const allowanceDiv = document.createElement('div');
                allowanceDiv.className = 'allowanceField';
                
                const nameInput = document.createElement('input');
                nameInput.type = 'text';
                nameInput.placeholder = 'Allowance Name ' + (allowanceCount + 1);
                nameInput.id = 'allowance-name-' + (allowanceCount + 1);
                
                const amountInput = document.createElement('input');
                amountInput.type = 'number';
                amountInput.placeholder = 'Amount ' + (allowanceCount + 1);
                amountInput.id = 'allowance-amount-' + (allowanceCount + 1);
                amountInput.oninput = calculate;
                
                allowanceDiv.appendChild(nameInput);
                allowanceDiv.appendChild(amountInput);
                container.appendChild(allowanceDiv);
                
                allowanceCount++;
            }
        }

        function removeAllowance() {
            if (allowanceCount > 0) {
                const container = document.getElementById('allowanceFields');
                const lastAllowance = container.lastElementChild;
                if (lastAllowance) {
                    container.removeChild(lastAllowance);
                    allowanceCount--;
                }
            }
        }
          function addDeduction() {
            if (deductionCount < maxFields) {
                const container = document.getElementById('deductionFields');
                
                const deductionDiv = document.createElement('div');
                deductionDiv.className = 'deductionField';
                
                const nameInput = document.createElement('input');
                nameInput.type = 'text';
                nameInput.placeholder = 'Deduction Name ' + (deductionCount + 1);
                nameInput.id = 'deduction-name-' + (deductionCount + 1);
                
                const amountInput = document.createElement('input');
                amountInput.type = 'number';
                amountInput.placeholder = 'Amount ' + (deductionCount + 1);
                amountInput.id = 'deduction-amount-' + (deductionCount + 1);
                amountInput.oninput = calculate;
                
                deductionDiv.appendChild(nameInput);
                deductionDiv.appendChild(amountInput);
                container.appendChild(deductionDiv);
                
                deductionCount++;
            }
        }

        function removeDeduction() {
            if (deductionCount > 0) {
                const container = document.getElementById('deductionFields');
                const lastDeduction = container.lastElementChild;
                if (lastDeduction) {
                    container.removeChild(lastDeduction);
                    deductionCount--;
                }
            }
        }

 function calculate() {
    var level = document.getElementById('level').value;
    var basic = parseInt(document.getElementById('basic').value) || 0;
    var hraCity = document.getElementById('hracity').value;
    var taCity = document.getElementById('tacity').value;

    // Get DA percentage from the dropdown
    var daPercentage = parseFloat(document.getElementById('daPercentage').value);
    var da = basic * daPercentage;

    var hraPercentage = hraCity === 'X' ? 0.3 : hraCity === 'Y' ? 0.2 : hraCity === 'Z' ? 0.1 : 0;
    var hra = basic * hraPercentage;

    // TA Calculation
    var ta = 0, taPercentage = 0;
    if (taCity !== '0') {
        if (level <= 2) {
            ta = (basic < 24200) ? (taCity === '1' ? 1350 : 900) : (taCity === '1' ? 3600 : 1800);
        } else if (level <= 8) {
            ta = (taCity === '1' ? 3600 : 1800);
        } else {
            ta = (taCity === '1' ? 7200 : 3600);
        }
        taPercentage = Math.round(ta * daPercentage);
    }

    var taWithDa = ta + taPercentage;

    var allowanceSum = 0;
    document.querySelectorAll('#allowanceFields .allowanceField').forEach(field => {
        const amountInput = field.querySelector('input[type="number"]');
        allowanceSum += parseInt(amountInput.value) || 0;
    });

    var grossSalary = basic + da + hra + taWithDa + allowanceSum;

    var npsContribution = document.getElementById('include-nps').checked ? Math.round((basic + da) * 0.1) : 0;

    // CGHS contribution based on pay level
    const cghsContributions = {
        1: 250,
        2: 250,
        3: 250,
        4: 250,
        5: 250,
        6: 450,
        7: 650,
        8: 650,
        9: 650,
        10: 650,
        11: 650,
        12: 1000,
        13: 1000,
        A_13: 1000,
        14: 1000,
        AGP_10: 650,
        AGP_11: 650,
        AGP_12_IIT_NIT: 1000,
        AGP_12_UGC_etc: 1000,
        AGP_13_A_A1: 1000,
        AGP_13_A2: 1000,
        AGP_14: 1000,
        AGP_14A: 1000,
        AGP_15: 1000
    };
    var cghsContribution = document.getElementById('include-cghs').checked ? cghsContributions[level] || 0 : 0;

    var deductionSum = 0;
    document.querySelectorAll('#deductionFields .deductionField').forEach(field => {
        const amountInput = field.querySelector('input[type="number"]');
        deductionSum += parseInt(amountInput.value) || 0;
    });
    // Display the total sum of deductions
    document.getElementById('deductionSum').innerText = deductionSum;

    // Display the total sum of allowances
    document.getElementById('allowanceSum').innerText = allowanceSum;

    var annualIncomeTax = document.getElementById('new-regime').checked ? calculateIncomeTaxNewRegime(grossSalary * 12) : 0;
    var incomeTax = Math.round(annualIncomeTax / 12);

    var netSalary = grossSalary - npsContribution - cghsContribution - incomeTax - deductionSum;

    document.getElementById('selected-level').textContent = level;
    document.getElementById('selected-pay').textContent = basic;
    document.getElementById('da').textContent = Math.round(da);
    document.getElementById('hra1').textContent = Math.round(hra);
    document.getElementById('ta').textContent = Math.round(taWithDa);
    document.getElementById('total').textContent = Math.round(grossSalary);
    document.getElementById('nps').textContent = npsContribution;
    document.getElementById('cghs-contribution').textContent = cghsContribution;
    document.getElementById('income-tax').textContent = incomeTax;
    document.getElementById('incometaxAn').textContent = Math.round(annualIncomeTax);
    document.getElementById('net-salary').textContent = Math.round(netSalary);

    document.getElementById('result').style.display = 'table';
}



function calculateIncomeTaxNewRegime(salary) {
    const standardDeduction = 75000;
    const cessRate = 0.04; // 4% cess
    const noTaxThreshold = 775000; // Total income threshold for no tax

    // Calculate taxable income after standard deduction
    const taxableIncome = Math.max(salary - standardDeduction, 0);

    // Initialize annualIncomeTax to 0
    let annualIncomeTax = 0;

    // Apply no tax if total income before deduction is less than or equal to ₹850,000
    if (salary <= noTaxThreshold) {
        return annualIncomeTax; // No tax if salary is less than or equal to ₹850,000
    }

    // Calculate income tax based on tax slabs
    if (taxableIncome <= 300000) {
        annualIncomeTax = 0; // No tax up to ₹3,00,000
    } else if (taxableIncome <= 700000) {
        annualIncomeTax = (taxableIncome - 300000) * 0.05; // 5% tax on income between ₹3,00,001 and ₹7,00,000
    } else if (taxableIncome <= 1000000) {
        annualIncomeTax = 20000 + (taxableIncome - 700000) * 0.10; // 10% tax on income between ₹7,00,001 and ₹10,00,000
    } else if (taxableIncome <= 1200000) {
        annualIncomeTax = 50000 + (taxableIncome - 1000000) * 0.15; // 15% tax on income between ₹10,00,001 and ₹12,00,000
    } else if (taxableIncome <= 1500000) {
        annualIncomeTax = 80000 + (taxableIncome - 1200000) * 0.20; // 20% tax on income between ₹12,00,001 and ₹15,00,000
    } else {
        annualIncomeTax = 140000 + (taxableIncome - 1500000) * 0.30; // 30% tax on income above ₹15,00,000
    }

    // Calculate cess on the tax amount (4%)
    const cess = annualIncomeTax * cessRate;

    // Calculate final tax amount
    annualIncomeTax += cess;

    return annualIncomeTax;
}


 // Automatically calculate when the input value changes
        document.getElementById("annualIncomeInput").addEventListener("input", calculateIncomeTax);

        function calculateIncomeTax() {
            const salary = parseFloat(document.getElementById("annualIncomeInput").value);
            if (isNaN(salary)) {
                document.getElementById("annualIncomeTaxOutput").textContent = "";
                document.getElementById("monthlyIncomeTaxOutput").textContent = "";
                return;
            }

            const standardDeduction = 75000;
            const cessRate = 0.04; // 4% cess
            const noTaxThreshold = 775000; // Total income threshold for no tax

            // Calculate taxable income after standard deduction
            const taxableIncome = Math.max(salary - standardDeduction, 0);

            // Initialize annualIncomeTax to 0
            let annualIncomeTax = 0;

            // Apply no tax if total income before deduction is less than or equal to ₹850,000
            if (salary <= noTaxThreshold) {
                document.getElementById("annualIncomeTaxOutput").textContent = "Annual Income Tax: ₹0";
                document.getElementById("monthlyIncomeTaxOutput").textContent = "Monthly Income Tax: ₹0";
                return;
            }

            // Calculate income tax based on tax slabs
            if (taxableIncome <= 300000) {
                annualIncomeTax = 0; // No tax up to ₹3,00,000
            } else if (taxableIncome <= 700000) {
                annualIncomeTax = (taxableIncome - 300000) * 0.05; // 5% tax on income between ₹3,00,001 and ₹7,00,000
            } else if (taxableIncome <= 1000000) {
                annualIncomeTax = 20000 + (taxableIncome - 700000) * 0.10; // 10% tax on income between ₹7,00,001 and ₹10,00,000
            } else if (taxableIncome <= 1200000) {
                annualIncomeTax = 50000 + (taxableIncome - 1000000) * 0.15; // 15% tax on income between ₹10,00,001 and ₹12,00,000
            } else if (taxableIncome <= 1500000) {
                annualIncomeTax = 80000 + (taxableIncome - 1200000) * 0.20; // 20% tax on income between ₹12,00,001 and ₹15,00,000
            } else {
                annualIncomeTax = 140000 + (taxableIncome - 1500000) * 0.30; // 30% tax on income above ₹15,00,000
            }

            // Calculate cess on the tax amount (4%)
            const cess = annualIncomeTax * cessRate;

            // Calculate final tax amount
            annualIncomeTax += cess;

            // Calculate monthly income tax
            const monthlyIncomeTax = Math.round(annualIncomeTax / 12);

            // Output the results (rounded to integers)
            document.getElementById("annualIncomeTaxOutput").textContent = `Annual Income Tax: ₹${Math.round(annualIncomeTax)}`;
            document.getElementById("monthlyIncomeTaxOutput").textContent = `Monthly Income Tax: ₹${monthlyIncomeTax}`;
        }


    </script>











</body>
<a target=”_blank” href="https://www.gfr.co.in/p/7th-cpc-salary-calculator.html">www.gfr.co.in</a>
   
  <p style="color:red;"><i> Disclaimer: The 7th CPC (Central Pay Commission) calculator is only for reference purpose not for official use </i></p>  
</body>


</html>