Lv = (1.463 x 10^7 x R^2) / (Fb^2 x Vb) - 1.463 R
Lv = port length
Fb = tuning freq.
Vb = box volume (cu")
R = radius of port (if using slot or square port then R = sq.rt of A/Pi)
you'll need to do the math, internal w/ sub displacement, to get the length of the the port. once you know the length, you'll need to find it's displacement (including materials of construction) and do the math again...subtracting the port displacement from the Vb...to get you actual number. (really you can keep going back and forth but the difference is so small it don't matter, once is enough.)
also, if the port shares a common wall with the box (most slot ports) you need to account for the port correction factor. this is done by adding 1/2 of the port's width to it's length.