Calculate hourly rate from yearly salary

A friend and former colleague in the web industry asked about the current hourly rates for user interface design and information architecture work. That’s always a tough question based on experience, previous work, and the client (charge more for a bank than a non-profit working with kids with diseases). One rule of thumb I heard recently on RubyTalk was to take your current salary, figure out your current hourly rate, and multiply by two.


def calculate_hourly_rate(yearly_salary, hours_per_week, weeks_per_year)
  hourly_rate = (yearly_salary / (hours_per_week * weeks_per_year)) * 2
end

puts calculate_hourly_rate(50_000, 40, 50)