Question: how to calculate ndwi in qgis?
Answer: Go to Processing > Miscellaneous > Raster Calculator. In the calculation tab set the formula (A-B)/(A+B). This will perform the operation between the bands and will calculate the NDWI. Set a destination file and click Ok. 3.2 The pixel values should be situated between the values of -1 – 1.