Freelancer earnings


Suppose you're a freelance worker who earns an hourly rate throughout the year working on various projects. Additionally, you also incur a variety of work-related costs throughout the year that you can discount from your earnings when paying taxes. Lastly, you can assume you operate in a country with the following tax brackets on net income (your earnings - costs):

  • 0-100k USD taxed at 20%
  • 100k, <=150k USD taxed at 30%

  • 150k, <=200k USD taxed at 40%

  • 200k USD taxed at 45%

Given this information, write a function in Python that will feed in an hourly rate, the # of total hours worked, and the annual work-related costs to return the following:

  • Pre-tax net income
  • Taxes paid
  • Post-tax net income


Access restricted

Subscribe to premium account to see the solution.

Get premium now