Depending on how you want to handle the trip amount 0 (is this a zero result?), One of the following calculations should work:
declare @t table ([Date] date, Clockin time, CLockout time, Trip1 int, Trip2 int) insert into @t select '01/01/2013', '13:00', '17:00', 3, 3 union all select '01/01/2013', '13:00', '17:00', 0, 3 union all select '01/01/2013', '13:00', '17:00', 0, 0 union all select '01/01/2013', '13:00', '17:00', 3, null; select [minutes]=datediff(mi, Clockin, Clockout), [trips] = ((isnull(Trip1, 0)+isnull(Trip2,0))), [calc] = datediff(mi, Clockin, Clockout)/ (nullif((isnull(Trip1, 0)+isnull(Trip2,0)), 0)), [calc2] = datediff(mi, Clockin, Clockout)/ isnull((nullif((isnull(Trip1, 0)+isnull(Trip2,0)), 0)), 1) from @t