# Adding multiple rasters produces unexpected results. I have set the data extent to the same in all rasters

I am trying to add three rasters together. I'm trying to figure out where I am going wrong so I am going to list out what I am doing:

• I have Raster_1, Raster_2 and Raster_3.
• Raster_1 and Raster_2 were set to the extent of Raster_3
• I used the Map Algebra tool to write "Raster_1 + Raster_2 + Raster_3" = Raster_4
• Raster_4 only has areas where all three previous rasters intersect.
• I thought that by setting the extent of Raster_1 and Raster_2 to Raster_3 this wouldn't be an issue.
• I went to check that I had done this correctly but the extents had gone back to their previous extents.
• I reset Raster_1 and Raster_2 to the extent of Raster_3 but they are not the same. I have no idea why they would not be the same if that's how I am setting them. The setting I am using is:

the rectangular extent of Raster_3

What am I doing wrong?

1. use the `Con((IsNULL(Raster_x),0,RAster_x)` raster calculation on all your three rasters in order to change the no data values into a distinct number, I arbitrarily used `0`, as you said your next step is to sum the rasters, therefore a cell that is zero won't affect your operation, if you were to multiply the rasters though, `1` would be a better choice. Make sure you set the extent to the largest raster.
• One thing to be careful is , you won't be able to tell between the 'zeroes' from your original data and the ones from the new raster operation at step 1 in my answer. The other option is to set a large signed integer for the no data cells at step 1, for example `-999999` (This works if all your data is >=0) and to later select all negative cells from the resulting raster after step 2 and add `+999999` to them. Commented Oct 2, 2015 at 17:12