Calculation and example
For 8:30 AM to 5:00 PM, elapsed time is 8 hours 30 minutes. Subtract a 45-minute unpaid lunch: 7 hours 45 minutes remain. Do not subtract paid breaks. When shifts cross midnight, treat the earlier clock-out as the next day.
Reference: US Department of Labor: Breaks and meal periods.
Try it with your own values: Work Hours Calculator or Time Card Calculator with Lunch.