Formula:
Megapixels = (Width × Height) / 1,000,000
Example: 4000 × 3000 → (4000 × 3000) / 1,000,000 = 12 MP
File Size = Bytes / 1,048,576
Note: File size depends on compression, format (JPEG/PNG), and quality — not just resolution.