# Using ArcGIS Raster Calculator to calculate MSAVI2 based on Landsat 8 OLI bands 4 and 5

I would like to calculate a Modified Soil-Adjusted Vegetation Index 2 on the basis of Landsat 8 OLI imagery, bands 5 (NIR) and 4 (RED), using the Raster Calculator. The formula should be: I have tried to convert this using the following map algebra expression in the Raster Calculator:

MSAVI2 = (2 * "NIR layer" + 1 - SquareRoot((2 * "NIR layer" + 1) ^ 2 - 8 * ("NIR layer" - "RED layer"))) / 2

The returned values are between 0.5 and 58113.5. They should be between -1 and 1 though, so something is not right.

Any ideas about what is going wrong here?

• Did you convert to reflectance before applying the formula? – Mikkel Lydholm Rasmussen Aug 5 '16 at 14:18
• Have you converted the DNs to TOA reflectance? I'm not familiar with MSAVI2 specifically, but for NDVI you must convert before doing the raster algebra. See this tutorial as an example. – Christopher Aug 5 '16 at 14:20
• i would write with more ( ) between the sentences – Felpe Jan 17 '17 at 11:00

I've tried to use many examples that I've found at internet. All them failed. So I've build one by myself...

The equation that worked for me was:

``````((2*Float("IMAGE.tif - Band_4"))+1-(Power(((Power(((2*Float("IMAGE.tif - Band_4"))+1),2))-8*(Float("IMAGE.tif - Band_4")-Float("IMAGE.tif - Band_3"))),0.5)))/2
``````

Hope that it work for you!

It's ok, but don't use `y = arguments` syntax, only use `arguments`. In your case:

``````(2 * "NIR layer" + 1 - SquareRoot((2 * "NIR layer" + 1) ^ 2 - 8 * ("NIR layer" - "RED layer"))) / 2
``````

As Mikkel says, convert values to reflectance before apply this index. Check this link for Landsat 8. All information is in `MTL.txt` file.