Online ruler horizontal

Not calibrated
Drag from a ruler to add a guide.
0 in Estimate, calibrate for real size 

Width 0

Reading details

Settings

px means CSS pixels, the browser's layout unit (1/96 in before calibration), not your screen's device pixels. A phone with a device pixel ratio of 3 has 3 × 3 device pixels in each CSS pixel.

History

Loading history

    All keyboard shortcuts

    Shortcuts work while the ruler is on screen. They are off while you type in a field, and Ctrl, Cmd and Alt combinations are left to the browser.

    ?
    Show or hide this list
    I C M
    Inches, centimetres, millimetres
    P
    CSS pixels as the reading unit
    Shift + P
    Show CSS pixels next to the length unit (cm + px)
    1 2 3 4
    Ruler, Calipers, Chain, Box
    ← → ↑ ↓
    Move the reading line 1 px
    Shift + arrow
    Move the reading line 1 mm
    G
    Add a guide at the reading line
    Shift + G
    Clear guides
    X
    Crosshair on or off
    E
    Next ruler edge (top, right, bottom, left, all four)
    O
    Horizontal or vertical ruler
    F
    Full screen on or off
    T
    Next colour theme (system, light, dark)
    S
    Save the reading to History
    H
    Open History
    Esc
    Clear guides and the box, or close a panel

    On a focused handle, arrow keys move it 1 px, Shift 10 px and Alt 0.1 mm. On a focused guide, arrow keys move it and Delete removes it.

    How the horizontal ruler works

    The horizontal ruler runs along the top or bottom edge of the screen, which gives the longest scale on a laptop or monitor.

    1. Calibrate the screen with a credit card.
    2. Choose the top or bottom edge for the scale.
    3. Place the object's left end at the 0 mark.
    4. Drag the reading line to the right end.
    5. Read the width in centimetres, millimetres and inches.
    012345 cm reading
    The horizontal scale along the top edge, with the reading line at the right end of the object.

    Horizontal ruler formula

    Pixels per inch (PPI) equal the diagonal resolution in pixels divided by the diagonal size in inches. The diagonal resolution is √(width² + height²). Divide PPI by 25.4 for pixels per millimetre, and by the device pixel ratio for CSS pixels.

    PPI = √(w² + h²) ÷ diagonal_in
    w, h
    native resolution in pixels
    diagonal_in
    visible diagonal in inches

    Worked example, live

    √(2560² + 1440²) = 2937.2 px on the diagonal. 2937.2 ÷ 27 in = 108.8 PPI (4.28 pixels per mm). The diagonal is 68.6 cm.

    Horizontal ruler conversion chart

    Apple's published diagonals and resolutions give about 219 to 460 PPI for these 8 screens. PPI is computed from each published resolution and diagonal; the diagonal is also shown in centimetres.

    Apple screens: published diagonal and resolution, with the PPI they give
    DeviceDiagonal inDiagonal cmResolutionPPI
    MacBook Air 13-inch (M2 and later)13.634.52560 × 1664225
    MacBook Air 15-inch15.338.92880 × 1864224
    MacBook Pro 14-inch14.236.13024 × 1964254
    MacBook Pro 16-inch16.241.13456 × 2234254
    iMac 24-inch (4.5K)23.559.74480 × 2520219
    iPhone 166.1215.52556 × 1179460
    iPad Air 11-inch (M2 and later)10.8627.62360 × 1640265
    iPad Air 13-inch (M2 and later)12.932.82732 × 2048265

    Horizontal ruler FAQ

    How do you measure width on a laptop screen?

    Use the horizontal ruler along the top edge: put the left end of the object at 0 and drag the reading line to its right end. A MacBook Air with a 13.6-inch (34.5 cm) screen is about 29 cm (11.4 in) wide, so the horizontal ruler can be nearly that long. Measure longer objects in 2 segments with chain mode.

    How much error is there over the full width of a monitor?

    It depends on your calibration, and the verify step shows the error in percent. At its 1.5% limit that is 9 mm (0.35 in) across a monitor 60 cm (23.6 in) wide. The error grows with length, so verify the calibration with a long object, such as an A4 sheet (297 mm, 11.69 in), on a large screen. Use a tape measure for anything that needs millimetre accuracy over that length.

    Does the horizontal ruler work on a phone in landscape?

    Yes, turn the phone sideways to get the longest horizontal scale. A phone 150 mm (5.9 in) long gives a landscape ruler a little shorter than that, because the screen is smaller than the body. Calibrate in the orientation you measure in, and recalibrate if the readings look wrong after rotating.

    How many inches wide is 30 cm?

    30 cm is 11.81 in, or 11 13/16 in to the nearest 1/16 inch. The horizontal ruler converts every reading this way, so a 30 cm (300 mm) object shows centimetres, millimetres and inches side by side. The conversion uses the exact factor 1 in = 2.54 cm.

    What is the longest object the horizontal ruler can measure?

    The longest single reading equals the width of the browser window, for example about 29 cm (11.4 in) on a 13.6-inch laptop. Chain mode adds segments together, so you can measure a longer object in 2 or more steps: mark where the first segment ends, slide the object back to 0 and measure the rest.

    Calibrate

    Not calibrated
    1. Most reliable method. Hold any bank card or driving licence flat on the screen (85.6 × 53.98 mm), top-left corner in the outline's corner.
    2. Drag the orange handle until the right edges line up. Arrow keys: 1 px, Shift 10 px.