By Newton's second law, the net vertical force on the box is
∑ F[vertical] = n - mg = 0
where n = magnitude of normal force and mg = weight of the box. It follows that
n = mg
so that static/stable friction has a maximum magnitude of
f = µn = 0.4 mg
The box stays at rest up to the point that the applied force matches this magnitude of about 0.4 (4 kg) g ≈ 16 N.