today is to detect and monitor slight changes in water content of the water bodies. Taking advantage of the NIR (near-infrared) and GREEN (visible green) spectral bands, the NDWI is capable of enhancing the water bodies in a satellite image. The downside of the index is that it is sensitive to built structures, which can lead to overestimation of water bodies.
For Landsat 8 data:
NDWI = (Band 3 – Band 5)/(Band 3 + Band 5)
Where Band 3 corresponds to Green light and Band 5 is near infrared