End time minus start time minus the break. A shift that runs past midnight counts on instead of going negative: starting at 22:00 and stopping at 02:30 is four and a half hours, not minus nineteen and a half. That sounds obvious until you see a spreadsheet get it wrong.
This sheet does not work out overtime or any premium. What counts as overtime and what it costs is written in the working rules of your country and your trade, and it differs even between trades in the same country. Put those hours on a line of their own if you need to charge them.