This project uses a device called a differential pressure transducer to measure the water pressure at the bottom of the tank, and from that to calculate how full the tank is. Water pressure increases by about 9.8067kPa per meter of depth so a full tank 2m tall will have a pressure at the bottom of about 19.6134kPa above ambient atmospheric pressure. The “above ambient atmospheric pressure” part is important: it’s not enough to simply measure the pressure at the bottom of the tank because varying climate conditions will alter the reading. That’s why this project uses a “differential” pressure transducer that has two inlets. By leaving one inlet open to the atmosphere and connecting the other to the bottom of the tank the transducer will output the difference between the two, automatically compensating for varying air pressure and giving a constant reading for constant depth.
http://www.practicalarduino.com/projects/water-tank-depth-sensor