Abstract The baseline Launder–Spalding k−ε model cannot be integrated to the wall. This paper seeks to incorporate the entire law of the wall into the model while preserving the original k−ε framework structure. Our approach involves modifying the unclosed dissipation terms in the k and ε equations specifically within the wall layer according to direct numerical simulation (DNS) data. The resulting model effectively captures the mean flow characteristics in both the buffer layer and the logarithmic layer, resulting in robust predictions of skin friction for zero-pressure-gradient (ZPG) flat-plate boundary layers and plane channels. To further validate our formulation, we apply our model to boundary layers under varying pressure gradients, channels experiencing sudden deceleration, and flow over periodic hills, with highly favorable results. Although not the focus of this study, the methodology here applies equally to the k–ω formulation and yields improved predictions of the mean flow in the viscous sublayer and buffer layer.