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
...To calculate end correction factor, simply add one-half of h [port_width] to the physical length you calculated above (L1 + L2) [vertical & horizontal components of the port length].