You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Rebate u/s 87A for new regime (if taxable income <= 7L, full rebate up to 25K)
1499
+
iftaxable_new<=700000:
1500
+
tax_new=max(0, tax_new-25000)
1501
+
1502
+
# Add 4% cess
1503
+
tax_new_with_cess=tax_new*1.04
1504
+
1505
+
# Determine better regime (prefer New when equal - simpler compliance)
1506
+
iftax_new_with_cess<tax_old_with_cess:
1507
+
better="new"
1508
+
savings=tax_old_with_cess-tax_new_with_cess
1509
+
eliftax_old_with_cess<tax_new_with_cess:
1510
+
better="old"
1511
+
savings=tax_new_with_cess-tax_old_with_cess
1512
+
else:
1513
+
# Equal taxes - prefer New Regime (simpler, government default)
1514
+
better="new"
1515
+
savings=0
1516
+
1517
+
# Generate recommendation
1518
+
ifgross_income<=700000:
1519
+
recommendation="With income ≤ ₹7L, New Regime is better (full rebate, zero tax)."
1520
+
elifgross_income<=1200000:
1521
+
iftotal_deductions_old-old_std_deduction>=150000:
1522
+
recommendation=f"With ₹{total_deductions_old-old_std_deduction:,.0f} in deductions, Old Regime saves ₹{savings:,.0f}."ifbetter=="old"elsef"Even with deductions, New Regime saves ₹{savings:,.0f}."
1523
+
else:
1524
+
recommendation="With limited deductions, New Regime is likely better."
1525
+
else:
1526
+
iftotal_deductions_old-old_std_deduction>=375000: # Max 80C + NPS + 80D + some HRA
1527
+
recommendation=f"With significant deductions (₹{total_deductions_old-old_std_deduction:,.0f}), Old Regime saves ₹{savings:,.0f}."
1528
+
else:
1529
+
recommendation=f"{'Old'ifbetter=='old'else'New'} Regime saves ₹{savings:,.0f}. Consider maximizing deductions to review."
0 commit comments