Nikon D40 vs. Nikon D5100

Comparison

change cameras »
D40 image
vs
D5100 image
Nikon D40 Nikon D5100
check price » check price »
Megapixels
6.10
16.20
Max. image resolution
3008 x 2000
4928 x 3264

Sensor

Sensor type
CCD
CMOS
Sensor size
23.7 x 15.6 mm
23.6 x 15.6 mm
Sensor resolution
3045 x 2003
4945 x 3275
Diagonal
28.37 mm
28.29 mm
Sensor size comparison
Sensor size is generally a good indicator of the quality of the camera. Sensors can vary greatly in size. As a general rule, the bigger the sensor, the better the image quality.

Bigger sensors are more effective because they have more surface area to capture light. An important factor when comparing digital cameras is also camera generation. Generally, newer sensors will outperform the older.

Learn more about sensor sizes »

Actual sensor size

Note: Actual size is set to screen → change »
vs
1 : 1
(ratio)
Nikon D40 Nikon D5100
Surface area:
369.72 mm² vs 368.16 mm²
Difference: 1.56 mm² (0.4%)
D40 sensor is slightly bigger than D5100 sensor (only 0.4% difference).
Note: You are comparing cameras of different generations. There is a 5 year gap between Nikon D40 (2006) and Nikon D5100 (2011). All things being equal, newer sensor generations generally outperform the older.
Pixel pitch
7.78 µm
4.77 µm
Pixel pitch tells you the distance from the center of one pixel (photosite) to the center of the next. It tells you how close the pixels are to each other.

The bigger the pixel pitch, the further apart they are and the bigger each pixel is. Bigger pixels tend to have better signal to noise ratio and greater dynamic range.
Difference: 3.01 µm (63%)
Pixel pitch of D40 is approx. 63% higher than pixel pitch of D5100.
Pixel area
60.53 µm²
22.75 µm²
Pixel or photosite area affects how much light per pixel can be gathered. The larger it is the more light can be collected by a single pixel.

Larger pixels have the potential to collect more photons, resulting in greater dynamic range, while smaller pixels provide higher resolutions (more detail) for a given sensor size.
Relative pixel sizes:
vs
Pixel area difference: 37.78 µm² (166%)
A pixel on Nikon D40 sensor is approx. 166% bigger than a pixel on Nikon D5100.
Pixel density
1.65 MP/cm²
4.39 MP/cm²
Pixel density tells you how many million pixels fit or would fit in one square cm of the sensor.

Higher pixel density means smaller pixels and lower pixel density means larger pixels.
Difference: 2.74 µm (166%)
Nikon D5100 has approx. 166% higher pixel density than Nikon D40.
To learn about the accuracy of these numbers, click here.

Specs

Nikon D40
Nikon D5100
Crop factor
1.53
1.53
Total megapixels
6.24
16.90
Effective megapixels
6.10
16.20
Optical zoom
Digital zoom
No
No
ISO sensitivity
Auto, 200 - 1600 (plus 3200 with boost)
Auto, 100- 6400 (plus 12800, 25600 with boost)
RAW
Manual focus
Normal focus range
Macro focus range
Focal length (35mm equiv.)
Aperture priority
Yes
Yes
Max. aperture
Max. aperture (35mm equiv.)
n/a
n/a
Metering
3D Matrix, Centre weighted, Spot
Centre weighted, Matrix, Spot
Exposure compensation
±5 EV (in 1/3 EV steps)
±5 EV (in 1/3 EV, 1/2 EV steps)
Shutter priority
Yes
Yes
Min. shutter speed
30 sec
30 sec
Max. shutter speed
1/4000 sec
1/4000 sec
Built-in flash
External flash
Viewfinder
Optical (pentamirror)
Optical (pentamirror)
White balance presets
6
12
Screen size
2.5"
3"
Screen resolution
230,000 dots
921,000 dots
Video capture
Max. video resolution
1920x1080 (30p/25p/24p)
Storage types
Secure Digital
SDHC, SDXC, Secure Digital
USB
USB 2.0 (480 Mbit/sec)
USB 2.0 (480 Mbit/sec)
HDMI
Wireless
GPS
Battery
Nikon EN-EL9 Lithium-Ion included
Lithium-Ion EN-EL14 rechargeable battery
Weight
522 g
560 g
Dimensions
126 x 64 x 94 mm
128 x 97 x 79 mm
Year
2006
2011



Choose cameras to compare

vs

Diagonal

Diagonal is calculated by the use of Pythagorean theorem:
Diagonal =  w² + h²
where w = sensor width and h = sensor height

Nikon D40 diagonal

w = 23.70 mm
h = 15.60 mm
Diagonal =  23.70² + 15.60²   = 28.37 mm

Nikon D5100 diagonal

w = 23.60 mm
h = 15.60 mm
Diagonal =  23.60² + 15.60²   = 28.29 mm


Surface area

Surface area is calculated by multiplying the width and the height of a sensor.

D40 sensor area

Width = 23.70 mm
Height = 15.60 mm

Surface area = 23.70 × 15.60 = 369.72 mm²

D5100 sensor area

Width = 23.60 mm
Height = 15.60 mm

Surface area = 23.60 × 15.60 = 368.16 mm²


Pixel pitch

Pixel pitch is the distance from the center of one pixel to the center of the next measured in micrometers (µm). It can be calculated with the following formula:
Pixel pitch =   sensor width in mm  × 1000
sensor resolution width in pixels

D40 pixel pitch

Sensor width = 23.70 mm
Sensor resolution width = 3045 pixels
Pixel pitch =   23.70  × 1000  = 7.78 µm
3045

D5100 pixel pitch

Sensor width = 23.60 mm
Sensor resolution width = 4945 pixels
Pixel pitch =   23.60  × 1000  = 4.77 µm
4945


Pixel area

The area of one pixel can be calculated by simply squaring the pixel pitch:
Pixel area = pixel pitch²

You could also divide sensor surface area with effective megapixels:
Pixel area =   sensor surface area in mm²
effective megapixels

D40 pixel area

Pixel pitch = 7.78 µm

Pixel area = 7.78² = 60.53 µm²

D5100 pixel area

Pixel pitch = 4.77 µm

Pixel area = 4.77² = 22.75 µm²


Pixel density

Pixel density can be calculated with the following formula:
Pixel density =  ( sensor resolution width in pixels )² / 1000000
sensor width in cm

One could also use this formula:
Pixel density =   effective megapixels × 1000000  / 10000
sensor surface area in mm²

D40 pixel density

Sensor resolution width = 3045 pixels
Sensor width = 2.37 cm

Pixel density = (3045 / 2.37)² / 1000000 = 1.65 MP/cm²

D5100 pixel density

Sensor resolution width = 4945 pixels
Sensor width = 2.36 cm

Pixel density = (4945 / 2.36)² / 1000000 = 4.39 MP/cm²


Sensor resolution

Sensor resolution is calculated from sensor size and effective megapixels. It's slightly higher than maximum (not interpolated) image resolution which is usually stated on camera specifications. Sensor resolution is used in pixel pitch, pixel area, and pixel density formula. For sake of simplicity, we're going to calculate it in 3 stages.

1. First we need to find the ratio between horizontal and vertical length by dividing the former with the latter (aspect ratio). It's usually 1.33 (4:3) or 1.5 (3:2), but not always.

2. With the ratio (r) known we can calculate the X from the formula below, where X is a vertical number of pixels:
(X × r) × X = effective megapixels × 1000000    →   
X =  effective megapixels × 1000000
r
3. To get sensor resolution we then multiply X with the corresponding ratio:

Resolution horizontal: X × r
Resolution vertical: X

D40 sensor resolution

Sensor width = 23.70 mm
Sensor height = 15.60 mm
Effective megapixels = 6.10
r = 23.70/15.60 = 1.52
X =  6.10 × 1000000  = 2003
1.52
Resolution horizontal: X × r = 2003 × 1.52 = 3045
Resolution vertical: X = 2003

Sensor resolution = 3045 x 2003

D5100 sensor resolution

Sensor width = 23.60 mm
Sensor height = 15.60 mm
Effective megapixels = 16.20
r = 23.60/15.60 = 1.51
X =  16.20 × 1000000  = 3275
1.51
Resolution horizontal: X × r = 3275 × 1.51 = 4945
Resolution vertical: X = 3275

Sensor resolution = 4945 x 3275


Crop factor

Crop factor or focal length multiplier is calculated by dividing the diagonal of 35 mm film (43.27 mm) with the diagonal of the sensor.
Crop factor =   43.27 mm
sensor diagonal in mm


D40 crop factor

Sensor diagonal in mm = 28.37 mm
Crop factor =   43.27  = 1.53
28.37

D5100 crop factor

Sensor diagonal in mm = 28.29 mm
Crop factor =   43.27  = 1.53
28.29

35 mm equivalent aperture

Equivalent aperture (in 135 film terms) is calculated by multiplying lens aperture with crop factor (a.k.a. focal length multiplier).

D40 equivalent aperture

Aperture is a lens characteristic, so it's calculated only for fixed lens cameras. If you want to know the equivalent aperture for Nikon D40, take the aperture of the lens you're using and multiply it with crop factor.

Crop factor for Nikon D40 is 1.53

D5100 equivalent aperture

Aperture is a lens characteristic, so it's calculated only for fixed lens cameras. If you want to know the equivalent aperture for Nikon D5100, take the aperture of the lens you're using and multiply it with crop factor.

Crop factor for Nikon D5100 is 1.53

Enter your screen size (diagonal)

My screen size is  inches



Actual size is currently adjusted to screen.

If your screen (phone, tablet, or monitor) is not in diagonal, then the actual size of a sensor won't be shown correctly.