To reduce packet collision probability, Binary Exponential Backoff (BEB) algorithm is presented in IEEE 802.11 standard. The BEB, however, exhibits the shortcoming that Contention Window (CW) oscillation occurs when packet collision probability is large. That is, it repeats frequently that the CW size has to be doubled several times from its minimum value so that the node is able to transmit a frame successfully and then the node resets the CW size to the minimal value again. To overcome CW oscillation, a Two-step BEB (TBEB) algorithm is proposed in this paper. Additionally, the statistics of the TBEB, such as the probability distributions of backoff, the average CW size, the average number of backoffs, the time needed by the node for transmitting a frame, and throughput, are all derived from a two-dimension Markov model, and they are validated by simulations. The TBEB is able to maximize the throughput by resetting its CW to the best size obtained from solving the simple optimization problem proposed in this paper.