Any way to calculate overtime?

Any way to calculate overtime?

Let's say I need to calculate time-and-a-half per hour after I go over 40 hours on an invoice. Is that possible to do automatically?