NDVI Explained: Vegetation Analysis Step by Step in QGIS and ArcGIS Pro

NDVI Explained: Vegetation Analysis Step by Step in QGIS and ArcGIS Pro

There is a small piece of arithmetic that has probably saved more crops, forests and budgets than any other formula in remote sensing. It takes two bands of a satellite image, subtracts one from the other, divides by their sum, and gives you a number between minus one and one. That number tells you, for every pixel on Earth, how green and healthy the vegetation is. It is called the Normalized Difference Vegetation Index, or NDVI, and I have used it in projects on every continent: tracking drought in rangelands, spotting irrigation failures, mapping urban green space, detecting illegal clearing.

What I love about NDVI is that you can learn it in an afternoon and still be refining your use of it years later. In this guide I’ll explain what it measures and why it works, then walk you through computing it step by step on your desktop, in both QGIS and ArcGIS Pro, covering the preparation steps that most tutorials skip and that cause most of the errors.

This is the desktop-GIS version of the topic. If you prefer working with code, we cover the same analysis in Raster Processing in Python: Rasterio, Xarray, and NDVI from Code, and in the cloud with Google Earth Engine for Beginners.

Chart: NDVI compares near-infrared and red reflectance; healthy vegetation scores high and water scores negative.
NDVI compares near-infrared and red reflectance; healthy vegetation scores high and water scores negative.

What NDVI Measures and Why It Works

Healthy green plants have a distinctive optical signature, which we can exploit with two bands.

  • Red light: chlorophyll, the pigment in leaves, absorbs most red light to power photosynthesis. Healthy vegetation looks dark in the red band.
  • Near-infrared (NIR) light: the internal structure of healthy leaves strongly reflects near-infrared. Healthy vegetation looks bright in the NIR band. Our eyes cannot see this, but sensors can.

Stressed, dying or sparse vegetation absorbs less red and reflects less NIR, so the two values move closer together. Bare soil, rock and built surfaces have similar red and NIR values. Water absorbs both strongly. The contrast between red and NIR is therefore a sensitive indicator of green plant material. The broader principles are in Remote Sensing Basics for GIS Users.

The formula

NDVI = (NIR – Red) / (NIR + Red)

The division by the sum normalizes the result, reducing the effects of illumination differences, such as sun angle and shadows, so that values are comparable across places and dates.

How to read the values

NDVI range (approx.)Typical surface
Below 0Water, snow, clouds
0 to 0.1Bare soil, rock, sand, built-up areas
0.1 to 0.3Sparse vegetation, senescent crops, dry grassland
0.3 to 0.6Moderate vegetation, growing crops, shrubs
0.6 to 0.9Dense, healthy vegetation, forest, peak-season crops

These ranges are guidelines, not laws. Values depend on the sensor, the season, the vegetation type and the background soil. Treat NDVI as a relative measure and calibrate your interpretation to your region and your crop or ecosystem.


Which Bands Do I Need?

NDVI uses the red and near-infrared bands, but band numbers differ between sensors. Using the wrong ones is the most common mistake.

SensorRed bandNear-infrared bandResolution
Sentinel-2B4B810 m
Landsat 8 and 9 (OLI)B4B530 m
Landsat 4 to 7 (TM and ETM+)B3B430 m
MODISBand 1 (red)Band 2 (NIR)250 m

Where your data come from is covered in Satellite Imagery Sources: Free vs. Paid. For this tutorial, I will use Sentinel-2 as the example, since it’s free, frequent and sharp. The steps for Landsat are identical once you substitute the band numbers.


Step 0: Prepare the Right Data

A good NDVI starts before you open the Raster Calculator.

Diagram: NDVI values separate water, bare ground and vegetation of different density, but thresholds depend on the sensor and the region.
NDVI values separate water, bare ground and vegetation of different density, but thresholds depend on the sensor and the region.

1. Choose the right product

Use Level-2A surface reflectance data for Sentinel-2, or Level-2 surface reflectance for Landsat, rather than top-of-atmosphere data. Atmospheric correction improves comparability between dates, which matters whenever you compare or track change.

2. Choose the right date

  • Pick a date with low cloud cover over your area of interest.
  • Match the season to the question. For crop vigor, choose the growth stage of interest. For comparing years, use the same time of year, since seasonal change in vegetation can easily be mistaken for real change.
  • Consider a composite of several dates, such as the median, to get a clean image.

3. Understand the scale factors and offsets

Reflectance is often stored as scaled integers. NDVI is a ratio, so a pure scale factor cancels out. But an offset does not.

  • Sentinel-2 Level-2A: reflectance equals the stored value divided by 10,000. For products processed with processing baseline 04.00 or later (from early 2022), a radiometric offset of 1,000 was introduced: reflectance equals (stored value minus 1,000) divided by 10,000. If you compute NDVI on raw values from these products without subtracting the offset, your NDVI will be slightly biased, and mixing old and new products in a time series will create artificial jumps. Check the product metadata and apply the offset where specified.
  • Landsat Collection 2 Level-2: surface reflectance equals the stored value multiplied by 0.0000275, minus 0.2.

The safest practice is to convert to real reflectance first, then compute NDVI.

4. Mask clouds and shadows

Clouds have low NDVI and shadows are dark, and both contaminate any statistics. Use the quality information provided with the data: the Scene Classification layer (SCL) in Sentinel-2 Level-2A, or the QA band in Landsat. We’ll use it in the steps below.

5. Check the coordinate system

Bands from the same tile share a projection, but if you combine tiles from different UTM zones, you will need to reproject. See Coordinate Reference Systems (CRS) Explained Simply.

6. Clip to your study area

Work with a clipped area to save time and memory.


NDVI Step by Step in QGIS

Step 1: Get and load the bands

Download your Sentinel-2 Level-2A scene (for example, through the Copernicus data portal, or with the Semi-Automatic Classification Plugin, as described in Best GIS Plugins for QGIS). Add the red band (B04) and the near-infrared band (B08), both at 10 meters, with Layer > Add Layer > Add Raster Layer. Also add the SCL layer if you plan to mask clouds.

Check that the layers have the correct CRS, and that the project CRS is a projected system suited to your area.

Step 2: Clip the bands to your area (optional but recommended)

Use Raster > Extraction > Clip Raster by Mask Layer, with a polygon of your study area, for each band. Clipping first speeds everything up.

Step 3: Convert to reflectance

If your product has an offset, apply it. In the Raster Calculator, a simple expression for Sentinel-2 with the 1,000 offset looks like this, for the red band:

("B04@1" - 1000) / 10000

Do the same for B08. Save each result as a new floating-point raster. If your product has no offset, dividing by 10,000 is all that is needed, and for NDVI alone you can skip this step.

Step 4: Mask the clouds (optional but recommended)

Using the SCL layer, build a mask that keeps only valid vegetation, soil, water and similar classes, and removes clouds, shadows and cirrus. In the Raster Calculator, a mask can be written with conditions on the SCL values, such as excluding classes 3 (cloud shadow), 8 and 9 (cloud probabilities) and 10 (thin cirrus):

("SCL@1" != 3) AND ("SCL@1" != 8) AND ("SCL@1" != 9) AND ("SCL@1" != 10)

This produces a raster of ones and zeros. Multiply it by your NDVI later, or set the zero cells to NoData. Note that SCL has a 20-meter resolution, so you may need to resample it to 10 meters to match the other bands.

Step 5: Calculate NDVI with the Raster Calculator

Open Raster > Raster Calculator, and enter:

("B08_refl@1" - "B04_refl@1") / ("B08_refl@1" + "B04_refl@1")

(Replace the layer names with yours.) Choose an output file, a GeoTIFF, make sure the output extent and CRS match your data, and run it. Since the inputs are floating-point numbers, the division works correctly. If you work with integer rasters, convert to float first. Integer division would produce only zeros and ones.

A command-line alternative, using GDAL, produces the same result:

gdal_calc.py -A B08.tif -B B04.tif --outfile=ndvi.tif \
  --calc="(A.astype(float)-B)/(A.astype(float)+B)" \
  --type=Float32 --NoDataValue=-9999

Step 6: Style the result

Open the layer properties and choose Symbology > Singleband pseudocolor.

  • Set the minimum to about -0.2 and the maximum to about 0.9, or use Min / Max Value Settings to calculate from the data.
  • Choose a diverging color ramp that moves from brown or yellow (low) to dark green (high), such as RdYlGn.
  • Use Continuous interpolation for a smooth look, or Equal interval classes for a banded map.

Compare with the true-color image using the layer swipe or by toggling visibility, to check that the greenest areas are indeed vegetation.

Step 7: Extract numbers

To summarize NDVI per field, parcel or district, use the Processing tool Zonal Statistics with your polygon layer, and calculate the mean, median, minimum, maximum and standard deviation. The result is an attribute table of NDVI values per polygon, ready for charts and ranking. For the underlying logic, see Spatial Analysis in GIS: Complete Guide.

Step 8: Save and document

Save the NDVI raster, your styling and the project. Record the source scene, date, processing level, the band numbers, the offset applied and the mask used, following the practice in Metadata in GIS: Why It Matters and How to Create It.


NDVI Step by Step in ArcGIS Pro

Step 1: Get and add the data

Add your Sentinel-2 (or Landsat) bands to a map. Many Sentinel-2 products can be added as a multi-band item that exposes all bands. Otherwise, add the red and NIR bands as individual layers. Make sure that the red and NIR bands are at the same resolution and in the same coordinate system.

Step 2: Clip to the area of interest

Use the Clip Raster tool with your boundary polygon, or limit the processing extent in the environment settings.

Step 3: Compute NDVI with the built-in index tool

The easiest route is the raster function for NDVI. On the Imagery tab, open the Indices gallery (or the Raster Functions pane) and choose NDVI. Then set the band indexes: for a multi-band Sentinel-2 raster, the red band is band 4 and the near-infrared band is band 8 in the full list. For a Landsat 8 or 9 multi-band raster, the red band is band 4 and the near-infrared band is band 5, depending on how the bands were arranged. Check your raster’s band order, since a stack that only includes selected bands will have different positions.

The result is a dynamic, on-the-fly layer. To make it permanent, use Export Raster or Save as and choose a 32-bit floating-point TIFF.

Step 4: Or calculate it yourself with the Raster Calculator

With the Spatial Analyst extension, open the Raster Calculator tool and enter an expression such as:

Float("B08.tif" - "B04.tif") / Float("B08.tif" + "B04.tif")

The Float function is essential. It forces decimal arithmetic, so that integer inputs don’t produce truncated results. If you are applying a reflectance conversion with an offset, convert both bands first, then calculate the index.

Step 5: Mask clouds

If you have the SCL layer, create a mask with the Con tool or a conditional expression, to keep only valid classes, and apply it to the NDVI, setting cloudy areas to NoData. Match the resolution of the mask to the bands.

Step 6: Symbolize

In the Symbology pane, set the primary symbology to Stretch, choose a green-to-brown color ramp, and set the stretch type to Minimum Maximum with custom values (for example -0.2 to 0.9). You can also classify NDVI into a few meaningful classes for a simpler map.

Step 7: Summarize by zones

Use Zonal Statistics as Table with your polygon layer, such as fields or districts, to compute the mean and other statistics of NDVI per zone. Join the table back to the polygons to map or rank them.

Step 8: Layout and share

Build a layout with a title, legend, scale bar and date. Share the layer as a web layer, or export for reports. Remember to document the data and parameters.


From a Single Date to Useful Insight

One NDVI map is a snapshot. The real value comes from comparison.

Compare dates

  • Same area, different dates: subtract one NDVI from another to map change, with positive values showing greening and negative values showing loss of vigor. Use the same season, and the same sensor, wherever possible.
  • Compare with a reference: the average NDVI for the same date in previous years gives an anomaly, which shows whether this year is better or worse than normal. A powerful tool for drought monitoring.

Build a time series

Compute NDVI for many dates and chart the mean NDVI of a field or a region over a season. The curve reveals phenology: planting, growth, peak, senescence and harvest. Gaps and deviations expose problems such as delayed planting, water stress or crop failure.

Classify

Thresholds on NDVI can separate vegetation from non-vegetation, or distinguish crop stages. Use them with caution: a threshold that works in one place and season may fail elsewhere. For fuller categorization, see Land Use and Land Cover Classification Guide.

Combine with other layers

Overlay NDVI with parcels, soil maps, irrigation networks or rainfall to explain the patterns, using the tools in Buffer, Clip, Intersect, Union: Overlay Tools Explained.


Limits of NDVI and Related Indices

NDVI is powerful, but it has well-known weaknesses. Knowing them lets you choose a better index when needed.

  • Saturation: in very dense vegetation, NDVI levels off and stops responding to further increases in biomass. Indices such as EVI (Enhanced Vegetation Index) handle dense canopies better.
  • Soil background: in sparse vegetation, the color and brightness of the soil influence NDVI. SAVI (Soil-Adjusted Vegetation Index) corrects for it.
  • Atmosphere and illumination: corrected by surface reflectance, but residual effects remain.
  • Mixed pixels: a 10-meter pixel may contain crops, a road and a hedge. NDVI reflects the mixture.
  • Not a direct measure of health or yield: it’s a proxy for green biomass and vigor. Different problems, such as disease, water stress and nutrient deficiency, can produce similar NDVI patterns.
  • Different sensors, different values: NDVI from Sentinel-2 and from Landsat are similar but not identical. Don’t mix them in a single series without a check.
  • Non-green vegetation: dry grass and woody stems have low NDVI even though they are plants.
  • Water, snow and clouds: produce low or negative values, and need masking or separate treatment.

Other useful indices

  • EVI: better in dense vegetation and with atmospheric correction.
  • SAVI and MSAVI: reduce soil effects in sparse vegetation.
  • NDRE: uses the red-edge band, more sensitive to chlorophyll content in mature crops (available in Sentinel-2).
  • NDWI and MNDWI: highlight open water.
  • NBR: maps burned areas and fire severity.
  • NDMI: sensitive to vegetation moisture.

Common Mistakes (and How to Avoid Them)

  • Using the wrong bands. Check the table above for your sensor.
  • Integer division. Convert to float, or use Float in ArcGIS. If your NDVI image contains only 0, 1 and -1, this is the cause.
  • Forgetting the offset or scale factor in recent Sentinel-2 products, then mixing products in a time series.
  • Ignoring clouds and shadows, which generate false low values or noise.
  • Comparing different seasons and calling it change.
  • Mixing sensors without checking that the values are comparable.
  • Using top-of-atmosphere data when comparing dates.
  • Mismatched resolutions, where a 20-meter mask is applied to a 10-meter band without resampling.
  • Applying a universal threshold, such as “NDVI above 0.3 is vegetation,” everywhere.
  • Not stretching the display properly, making a good result look flat.
  • Interpreting NDVI as proof of cause. It shows a pattern. Fieldwork explains it.
  • Not documenting the processing. The result then can’t be repeated or checked.

A Worked Example: Checking a Cooperative’s Irrigated Fields

Question: which fields of a cooperative showed weak vegetation in midsummer?

  1. Download two cloud-free Sentinel-2 Level-2A scenes from midsummer, one from this year and one from a typical earlier year.
  2. Prepare the bands: clip to the cooperative’s area, apply reflectance conversion with the correct offset, and mask clouds with SCL.
  3. Compute NDVI for both dates, in QGIS or ArcGIS Pro.
  4. Calculate zonal statistics (mean NDVI) per field, using the cooperative’s field boundaries.
  5. Calculate the anomaly: this year’s mean NDVI minus the reference year’s, per field.
  6. Map the anomaly with a diverging color ramp, and flag fields with a large negative difference.
  7. Send a field team to the flagged fields, to check irrigation, pests and planting dates. Record what they find.
  8. Refine: build a time series for the flagged fields to see when the divergence started.
  9. Report with maps, a table and a note on data and method.

The satellite didn’t diagnose the problem. It told the agronomists where to look first. That is the proper use of NDVI.


Final Thoughts

NDVI is a beautiful example of how a little physics and a little arithmetic can turn pixels into knowledge. But the best analysts treat it as a starting point. They prepare the data carefully, compare like with like, understand what the index cannot see, and always check their findings on the ground.

Compute NDVI for a place you know well, in both QGIS and ArcGIS Pro if you have access to both. Compare it with the landscape you remember. When the greenest patches match the orchards you know, and the pale ones match the bare plots, you’ll have understood the technique far better than from any formula.

Where to go next: continue with Land Use and Land Cover Classification Guide to turn indices and bands into maps of categories, and Working with Drones (UAV) and GIS to compute vegetation indices at the scale of individual plants.

Rachid Khouri

Rachid Khouri

Rachid Khouri is a CAD, BIM and GIS professional, Autodesk Authorized Developer, trainer and technical author with more than 30 years of experience, working with AutoCAD since 1992. He founded GISauthority.com to share practical guidance on GIS and spatial technologies.