Use this simple optical path difference (OPD) optics calculator to calculate phase shift which happens between two previously coherent sources when passed through different mediums online.
Formula:
OPD = [d1×n1] - [d2×n2]
where,
d1 & d2 are the distances of the ray passing through medium,
n1 - is the greater refractive index (eg: glass),
n2 - is the smaller refractive index (eg: air),
OPD - optical path difference.