Reliable data transfer is critical for several wireless sensing and networking applications. Reliability and the length of a transmitted wireless frame are inversely related to each other. In this paper, we analytically model reliability in terms of the number of transmissions required to correctly transmit a frame and the length of the frame. Given a reliability budget, the proposed model provides the maximum frame length to meet the budget. We develop this model for a binary symmetric channel (BSC) and extend the same model to a K-th order Markov channel. We empirically validate these models by using a comprehensive set of residual bit-error traces collected over operational 802.15.4 networks. We show that theoretical findings are consistent with empirical results and the proposed models provide realistic reliability guarantees in terms of allocated transmission budget and expected retransmission length. We also show that the throughput of the proposed models is better than that of existing packet length optimization approaches.