Skip to content
1440px

iMac 24″ (M4) Screen Size

CSS viewport, native resolution, pixel ratio and pixel density for the iMac 24″ (M4) — the numbers you need to design and build for it.

CSS viewport · portrait
2240 × 1260 px

Native resolution 4480 × 2520 px at 2× · 218 PPI · 23.5″ · 16:9. Design at 2240 × 1260 and export assets at 2×.

iMac 24″ (M4) display specifications
PropertyValue
CSS viewport (portrait)2240 × 1260 px
CSS viewport (landscape)1260 × 2240 px
Native resolution4480 × 2520 px
Device pixel ratio
Pixel density218 PPI
Screen diagonal23.5 in
Panel size20.55 × 11.56 in
Aspect ratio16:9
Total pixels11.29 MP
Released2024
Operating systemmacOS

Among the 37 desktop and laptop displays on this site, the iMac 24″ (M4) has the 5th largest CSS viewport area. Its 2240 px width is 569 px above the 1671 px average for this category.

Targeting the iMac 24″ (M4) in CSS

Device-specific media queries are brittle — a new model with the same width will not match. Use them for genuine per-device fixes only, and prefer width buckets for layout.

CSS media query
/* Target iMac 24″ (M4) specifically */
@media only screen
  and (device-width: 2240px)
  and (device-height: 1260px)
  and (-webkit-device-pixel-ratio: 2) {
  /* … */
}

/* More useful in practice — the width bucket it falls into */
@media (min-width: 2240px) { /* … */ }

Compare with other Mac & Displays models

iMac 24″ (M4) compared with nearby Mac & Displays models
DeviceCSS viewportNativeDPRPPIDiagonal
iMac 24″ (M4)2240 × 12604480 × 252021823.5″
MacBook Pro 16″ (M4)1728 × 11173456 × 223425416.2″
MacBook Air 15″ (M3)1710 × 11122880 × 186422415.3″
MacBook Pro 14″ (M4)1512 × 9823024 × 196425414.2″
MacBook Air 13″ (M3)1470 × 9562560 × 166422413.6″
MacBook Pro 16″ (M3)1728 × 11173456 × 223425416.2″
MacBook Air 15″ (M4)1710 × 11122880 × 186422415.3″
MacBook Air 15″ (M2)1710 × 11122880 × 186422415.3″
MacBook Pro 14″ (M3)1512 × 9823024 × 196425414.2″

Questions about the iMac 24″ (M4) screen

What is the screen size of the iMac 24″ (M4)?

The iMac 24″ (M4) has a 23.5-inch display. In CSS the viewport measures 2240 × 1260 px in portrait, and the panel itself has 4480 × 2520 physical pixels at 218 PPI.

What resolution should I design for on the iMac 24″ (M4)?

Design at 2240 × 1260 and export assets at . That gives you 4480 × 2520 px images, which is exactly what the panel renders. Designing directly at 4480 × 2520 means every measurement is 2 times larger than the CSS values you will write.

What is the device pixel ratio of the iMac 24″ (M4)?

The iMac 24″ (M4) reports a device pixel ratio of 2. One CSS pixel therefore covers 4 device pixels. You can read it in JavaScript with window.devicePixelRatio.

Which other devices have the same viewport as the iMac 24″ (M4)?

1 other device shares the 2240 × 1260 CSS viewport: iMac 24″ (M1). A layout that works on one works on all of them.

Related

Specifications from the manufacturer's published device data. Last verified 7 August 2026. CSS viewport values are the portrait window.innerWidth/innerHeight reported by the stock browser with no browser chrome. See methodology and sources.