# How do you figure out the ppi (pixels per inch)?

Discussion in 'MacBook Pro' started by Luba, Apr 21, 2010.

1. ### Luba macrumors 65816

Joined:
Apr 22, 2009
#1
I'v read that the 17" has 133 ppi, and the 15" high res has 128 ppi, but how is that figured out? I'd like to do the math for the 24" Apple Cinema Display. Thanks.

2. ### sammich macrumors 601

Joined:
Sep 26, 2006
Location:
Sarcasmville.
#2
Diagonal number of pixels: use Pythagoras:

Code:
`sqrt((width^2)+(height^2))/diagonal length`
The ACD 24": (1920^2 + 1200^2)/24 = 94.3 dpi

3. ### spinnerlys Guest

Joined:
Sep 7, 2008
Location:
forlod bygningen
4. ### Chundles macrumors G4

Joined:
Jul 4, 2005
#4
Number of Pixels/Number of Inches

Pretty straight forward maths.

5. ### striatedglutes macrumors 6502

Joined:
Feb 22, 2009
Location:
USA
#5
I love that producer price index also comes up. Fewer people probably know about that than pixels per inch :\

Joined:
Dec 22, 2007
#6
This OP ^^

7. ### sammich macrumors 601

Joined:
Sep 26, 2006
Location:
Sarcasmville.
#7
Damn, I hoped no one would notice that Was too busy adding the ACD calc

8. ### ethical macrumors 68000

Joined:
Dec 22, 2007
#8
haha sorry

i'll edit my post to save you

Joined:
Apr 22, 2009
10. ### jiE macrumors regular

Joined:
Sep 1, 2007
#10
Well... Not this way. The number of inches is a measure of the diagonal length of the screen, and not (if this formular would be correct) an area of the screen.

11. ### wandrer2 macrumors member

Joined:
Feb 9, 2010
#11
Also, just using the number of inches as specified by Apple is a bit inaccurate.

Measure the width of the screen in inches = w
Count the horizontal number of pixels = p

ppi = p/w

12. ### rodrigopolo macrumors newbie

Joined:
Sep 1, 2013
#12
JavaScript:
Code:
```var width = 1920;
var height = 1080;
var diagonal_inches = 24;
// result:
Math.sqrt((Math.pow(width,2)+Math.pow(height,2)))/diagonal_inches
```