Per baseball official rule 5.05(b), a batter becomes a baserunner and is awarded first base when he or his equipment (except for his bat):
- is touched by a pitched ball outside the strike zone,
- and he attempts to avoid it (or had no opportunity to avoid it),
- and he did not swing at the pitch.
If all these conditions are met, the ball is dead, and other baserunners advance if they are forced to vacate their base by the batter taking first. Rule 5.09(a) further clarifies that a hit by pitch is also called when a pitch touches a batter's clothing.
In the case where a batter swings and the pitch hits him anyway, the ball is dead and a strike is called. If the batter does not attempt to avoid the pitch, he is not awarded first base, and the pitch is ruled either a strike if in the strike zone or a ball if out of the strike zone. Umpires rarely make this call. A famous instance of a non-hit by pitch was on May 31, 1968, when Don Drysdale hit Dick Dietz with a pitch that would have forced in a run and ended Drysdale's scoreless innings streak at 44. Umpire Harry Wendelstedt ruled that Dietz made no effort to avoid the pitch; Dietz proceeded to fly out, and Drysdale's scoreless streak continued to a then-record 582⁄3 innings.
A hit-by-pitch can also be called on a pitch that has first touched the ground before hitting the batter. Such a bouncing pitch is like any other, and if a batter is hit by such a pitch, he will be awarded first unless he made no attempt to avoid it (and he had an opportunity to avoid it).
A batter hit by a pitch is not credited with a hit or at bat, but is credited with a time on base and a plate appearance; therefore, being hit by a pitch does not increase or decrease a player's batting average but does increase his on-base percentage. A batter hit by a pitch with the bases loaded is also credited with an RBI per MLB rule 10.04(a)(2). A pitch ruled a hit by pitch is recorded as a ball in the pitcher's pitch count, since by definition the ball must be outside the strike zone and not have been swung at.
The rule awarding first base to a batter hit by a pitch was instituted in 1887.