# Slight differences between NDVI calculated using Band math and the NDVI operator

Hi,

I’ve calculated the `NDVI` on a `Sentinel-2` optical image (`L2A`) using both the `Band math` operator (`(B8 - B4) / (B8 + B4)`) and the operator found under the `Optical menu` in `SNAP.

But there were a slight differences in the results in certain areas (I’ve compared these results simple using a the difference operator with `Band math`).

I’m wondering which one I should use? and whether those very small differences are just due to the precision employed (number of decimals in the intensity)?

Thanks.

How big are the differences? Probably it is only a matter of precision.
Are they in an order of magnitude of 10^-6?

1 Like

Yes that’s what I thought (the difference is actually in the order of < 10e-7).
I just wanted to be sure that there’s no differences between the two methods.

I am calculating NDVI via band math in graph builder and I wanna just to be sure about what to insert in “Target band type” and “no-data value”: software automatically inserts “float32” and “0.0”. Is that correct? What about “band unit”?

I find the same problem, but the differences are very significant. For example, te NDVI obtained from the Thematic Land Processor in SNAP delivers NDVI values over vineyard of over 0.8, whereas the values obtained from the band math using the Level 2A bands are just over 0.5. This has been happening consistently over the last two seasons, at least with the hdc tile. Does the SNAP preprocess the band data with some normalisation?

I find the same problem, but the differences are very significant. For example, te NDVI obtained from the Thematic Land Processor in SNAP delivers NDVI values over vineyard of over 0.8, whereas the values obtained from the band math using the Level 2A bands are just over 0.5. This has been happening consistently over the last two seasons, at least with the hdc tile. Does the SNAP preprocess the band data with some normalisation? Or do the NIR factor and R factor used to correct the formulae affect the results substantially. I can’t find a source of those factor values, either.