If it is truly a stop (that is, not a connection of any kind on two different flight numbers) then each flight is calculated separately.
if it's a connection, then the entire "direction" is calculated as one (think origin to destination)
Aside from the specific details tha can be picked apart, I think you get my gist, OP...