Progressive Tax Payroll Calculator
Progressive Tax Payroll Calculator
HardArrays100% accepted
Ravi manages payroll for a Delhi tech company using Indian progressive tax brackets: 0-250k (0%), 250k-500k (10%), 500k-1M (20%), above 1M (30%). Calculate net salary for each employee after applying progressive income tax.
Approach
Apply marginal progressive tax to each gross salary: 0-250000 → 0%, 250000-500000 → 5%, 500000-1000000 → 20%, above 1000000 → 30% (each rate applies only to the portion of salary within that slab). Return the list of net salaries (gross - tax) as [n1,n2,...].
Input
2
100000 300000
Output
[100000,297500]
More Arrays problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards