it's between 12 to 18 inches generally.... there's no real right or wrong length here..just depends on where you want the "supercharging"/helmholtz resonating effect to take place.
Of course there's space constraints as well....but on race cars that do not need to run headlights, you often see the unfiltered velocity stack sticking out of the bonnet.
However, in order to take full advantage of this, you need to have a programmable ecu.... As this supercharging effect will definitely affect the AFR and you need to compensate to make the most power safely.