$lower) {
$taxable = min($income, $upper) - $lower;
$tax += $taxable * $rate;
}
}
$cess = $tax * 0.04;
return round($tax + $cess, 2);
}
$tax = calculate_income_tax($income, $age, $regime);
$tax_result = "Income Tax Calculator
Total Tax Payable under " . ucfirst($regime) . " Regime: ₹" . number_format($tax, 2) . "
";
}
?>