There is no single 'right' box size — it follows from the driver's Thiele/Small parameters. The compliance-equivalent volume (Vas), total Q (Qts) and resonance (Fs) set how large the box should be and how low it will play.
Sealed box by target Qtc
For a sealed box you pick a target system Q (Qtc). Qtc 0.707 (Butterworth) is maximally flat and a safe default; lower Qtc means a bigger box and tighter bass, higher Qtc a smaller box with a bump. The required volume is Vb = Vas / ((Qtc/Qts)² − 1).
Ported box
A ported box is usually larger and tuned near the driver's resonance. A common starting estimate is Vb ≈ 20·Vas·Qts^3.3 with tuning Fb ≈ Fs·(Vas/Vb)^0.31, then refined against the modelled response.
Pick a driver from the database, or enter your own T/S parameters, and the designer computes both sealed and ported boxes with the −3 dB point and full response.