What does the Image Calculator command do ?
Performs arithmetic and logical operations between two images selected from popup menus. Image1 or both Image1 and Image2 can be stacks. If both are stacks, they must have the same number of slices. Image1 and Image2 must be the same data type but they do not have to be the same size.
You can select one of 12 operators from the Operation: popup menu. Check Create New Window and a new image or stack will be created to hold the result. Otherwise, the result of the operation replaces some or all of Image1. Check “32-bit Result” and the source images will be converted to 32-bit floating point before the specified operation is performed.
With 32-bit (float) images, pixels resulting from division by zero are set to Infinity, or to NaN (Not a Number) if a zero pixel is divided by zero. The divide-by-zero value can be redefined in Edit>Options>Miscellaneous>Divide by Zero Value.