When the ball stops being live
The ball becomes dead when the law or umpire says play has ended: for example after it is finally settled, a boundary is scored, a dismissal is completed, or the umpire intervenes for a dead-ball situation.
Byes, leg byes, and dead ball calls sit behind many strange scorecard moments. The umpire has to decide whether the ball was live, how the runs were made, and whether the batter made a genuine attempt required by the law.
The ball becomes dead when the law or umpire says play has ended: for example after it is finally settled, a boundary is scored, a dismissal is completed, or the umpire intervenes for a dead-ball situation.
Byes are extras scored when the ball passes the striker without touching the bat or the striker's person and the batters complete runs or the ball reaches the boundary.
Leg byes can be scored after the ball touches the striker's person, but the umpire may disallow them if the striker neither attempted to play the ball with the bat nor tried to avoid being hit.
If the ball is dead before a later run, overthrow, or dismissal attempt, that later action may not count. This is why the exact moment of dead ball matters.
The Laws list events that make the ball dead, such as a boundary, a completed dismissal, or the ball becoming trapped in a batter's clothing or equipment. In other situations the bowler's-end umpire decides that the ball is finally settled in the wicketkeeper's or bowler's hands, or calls dead ball because play has been interrupted. Merely returning the ball toward the keeper does not necessarily end it while the batters could still attempt a run. When reviewing a disputed sequence, identify the exact automatic event or umpire call instead of assuming the ball became dead as soon as the obvious action seemed over.
If the striker misses the ball entirely and it is not a wide, completed runs are byes. If it touches the striker's body without touching the bat, eligible runs are leg byes. For leg byes, the umpire must be satisfied that the striker either tried to play the ball with the bat or tried to avoid being hit. Otherwise the ball becomes dead once there is no further chance of dismissal, and attempted leg-bye runs are disallowed. A no-ball penalty remains a no-ball extra, while additional runs can be credited according to later bat or body contact. A wide is scored under its own category, so the same running cannot also be recorded as byes.
Suppose a legal delivery misses the bat, clips the striker's pad, escapes the wicketkeeper, and reaches the boundary. The result is not automatically four leg byes. The umpire first decides whether the striker attempted a shot or tried to avoid the ball. If either condition is satisfied, the boundary allowance can be recorded as leg byes. If neither is satisfied, leg byes are disallowed and the ball is made dead at the point required by the Law. Change the first contact to the bat and the same boundary belongs to the striker; remove all contact and it becomes byes, provided the delivery was not called wide.