Raw pixel storage is different from download size
The calculation multiplies width, height and bits per pixel, divides by eight to convert bits to bytes, then multiplies by image count. RGB with 8 bits per channel uses 24 bits per pixel; RGBA adds an alpha channel for a total of 32.
A JPEG, PNG or WebP file is encoded. Its size depends on image detail, metadata, compression and encoder settings. Two images with identical dimensions can have very different download sizes. Use the actual encoded file to check an upload limit.
For a paper scan, each dimension in millimeters is divided by 25.4 and multiplied by DPI, then rounded up to a whole pixel. Doubling both dimensions through a higher scanning resolution produces four times as many pixels. For batches, this estimates only equally sized raw images. An editor may retain an original, a preview and several intermediate copies. Treat the result as pixel-data storage, not a promise that a browser can process the whole batch in that much RAM.