We give a detailed description of the measurement of the W boson mass, MW, performed on an integrated luminosity of 4.3 fb−1, which is based on similar techniques as used for our previous measurement done on an independent data set of 1 fb−1 of data. The data were collected using the D0 detector at the Fermilab Tevatron Collider. This data set yields 1.68×106 W→eν candidate events. We measure the mass using the transverse mass, electron transverse momentum, and missing transverse energy distributions. The MW measurements using the transverse mass and the electron transverse momentum distributions are the most precise of these three and are combined to give MW=80.367±0.013(stat)±0.022(syst) GeV=80.367±0.026 GeV. When combined with our earlier measurement on 1 fb−1 of data, we obtain MW=80.375±0.023 GeV.