The effective length of the port is found by adding an end correction factor. An end correction factor is necesary because more often than not, one wall of the port is also one wall of the enclosure and this wall extends beyond the end of the port thus effectively adding length to the port (remember, the driver can't "see" the length of the port, it can only go by what it "feels" is going on).
Calculating end factor may sound like it would be more trouble than it's worth, but it's actually quite simple. To calculate end correction factor, simply add one-half of h to the physical length you calculated above (L1 + L2).
Since pictures are worth a thousand words, we've included a diagram above to help illustrate the point. Click on the image to see it at full size.