Start with width and height
A 12 MP image around 4000 × 3000 pixels can support many web uses and common print sizes. Heavy cropping, very large output, or detailed commercial work can require more.
Pixel quality matters
Lens quality, focus, sensor noise, processing, and compression can matter more than a small difference in megapixels. Calculate the actual file rather than relying only on the camera’s advertised maximum.
Calculate megapixels without guessing
Megapixels = width × height ÷ 1,000,000. A 4000 × 3000 image has 12 MP; a 3000 × 2400 image has 7.2 MP and provides 10 × 8 inches at 300 PPI. Cropping reduces the available pixels. Upscaling can increase the pixel count without restoring the detail of an original capture. Use both dimensions and the intended output size rather than megapixels alone.