Consider, a light wave of angular frequency ω and wave vector k travelling through vacuum along the x-direction. The phase of this wave is (kx-ωt). The speed of light in vacuum is c and that in medium is v.

where v is the frequency of light.
If the wave travels a distance ∆x, its phase changes by ∆φ = k∆x = ω∆x/v.
Similarly, if the wave is travelling in vacuum, k = ω/c and ∆φ = ω∆x/c
Now, consider a wave travelling a distance ∆x in the medium, the phase difference generated is,
∆φ’ = k’∆x = ωn∆x/c = ω∆x’/c … (1)
where ∆x’ = n∆x … (2)
The distance n∆x is called the optical path length of the light in the medium; it is the distance the light would have travelled in the same time t in vacuum (with the speed c).
The optical path length in a medium is the corresponding path in vacuum that the light travels in the same time as it takes in the given medium.

Thus, a distance d travelled in a medium of refractive index n introduces a path difference = nd – d = d(n – 1) over a ray travelling equal distance through vacuum.