Let PA be the pressure in the pipe and P0 be the atmospheric pressure.
ρm= Density of mercury, ρw= Density of water S= Specific gravity =ρm∕ρw⇒ρm=Sρw Balancing the pressure about datum (dotted line is the datum), PA+ρwgh1=P0+ρmgh2 PA−P0=ρmgh2−ρwgh1 ΔP (Gauge pressure) =g(ρmh2.−ρuh1) ΔP=gρW(Sh2−h1) ΔP∕(ρwg)=(h2.S−h1)m of water