Generating automated tax estimates
Suppose you're working for an accounting firm and looking to automate some tax estimates for clients. Under the relevant tax laws, an individual is taxed at 45% for any annual earnings >= 2M USD. For any earnings < 2M USD, the individual is taxed at a lower rate of 35%.
Write a function to calculate both the pre-tax and post-tax earnings for a given individual, with the ability to feed in the gross pre-tax earnings as an input.
For example, if an individual earns 2.6M USD for the year, your function should return:
- Pre-tax earnings were 2,600,000 for the year.
- Post-tax earnings were 2,000,000 * .65 + 600,000 * .55 = 1,630,000 for the year
Subscribe to premium account to see the solution.Get premium now