Calculating port displacement