This calculator is designed for round ports and rectangle/square ports with no flares. Flared ports (A.K.A. aero ports) are a lot better, but a bit more complex.

Port Length Calculator
US (inches, ft³) Metric (cm, liters)Rectangular Round

Ports can be quite complicated, this calculator makes it easy to figure out how long your port needs to be. But the hardest part is figuring out how to fit the port into the box. If you want to save yourself some time and trouble you can order some custom or premade plans.