The rule is the reaching the vertical plane of the nearer edge of the finish line.
Rule 164.2: the athletes shall be placed in the order in which any part of their bodies (i.e. torso, as distinguished from the head, neck, arms, legs, hands or feet) reaches the vertical plane of the nearer edge of the finish line as defined above (as "the finish of a race shall be denoted by a white line 50mm wide")