Need to know exactly how wide a button is, how much space sits between two icons or whether a web page lines up with its design mock-up? Guessing from a screenshot is slow and error-prone. An on-screen ruler measures distances and sizes in pixels directly on your desktop, over any app, browser or image. Windows 11 doesn't include one, but Microsoft's free PowerToys does, and a couple of other free tools do the same job.
We've put this guide together from Microsoft's PowerToys documentation and each developer's own pages, checked on 6 December 2026.
What you need
A Windows 11 PC (PowerToys also supports Windows 10 version 2004, build 19041, or newer) with a 64-bit x64 or ARM64 processor, according to Microsoft.
Microsoft PowerToys, which is free. If you're new to it, our guide on how to use Microsoft PowerToys covers the basics.
Step 1: Install PowerToys
Microsoft recommends installing PowerToys from its GitHub releases page or the Microsoft Store, and it can also be installed with the WinGet package manager. From a terminal, the command is:
winget install --id Microsoft.PowerToys --source winget
Step 2: Turn on Screen Ruler
Open PowerToys Settings, select Screen Ruler in the left-hand list and make sure it's switched on. The default activation shortcut is Win + Ctrl + Shift + M, which you can change on the same page.
Press Win + Ctrl + Shift + M and a small toolbar appears. It has four tools, which you can also select with Ctrl + 1, 2, 3 and 4:
Bounds (dashed square) - click and drag to draw a box and read its width and height. Hold Shift and the boxes stay in place until you cancel, so you can measure several things at once.
Spacing (cross) - measures horizontal and vertical space at the same time from your pointer to the nearest edges.
Horizontal - measures only horizontal spacing.
Vertical - measures only vertical spacing.
Spacing, Horizontal and Vertical use edge detection: move the pointer to the gap you want to measure and the lines stretch out until they hit a change in colour. Click the left mouse button and the measurement is copied to the clipboard, ready to paste into a bug report or chat. Press Esc, click the X on the toolbar or click to finish.
Step 4: Deal with gradients and shadows
If a measuring line stops too early - common on gradients, drop shadows and anti-aliased text - scroll up with the mouse wheel. Each tick raises the pixel-difference threshold by 15 units, so the line becomes more forgiving and runs further. Scroll down to reverse it. In Settings you can also set the default pixel tolerance for edge detection (0 to 255) and turn on per-colour-channel edge detection.
Step 5: Show inches, centimetres or DIPs
By default Screen Ruler shows only pixels. Under Extra units of measurement you can add inches, centimetres, millimetres or display-independent pixels (DIP). DIPs adjust for Windows display scaling using the scale of the monitor you're measuring on, which helps when you're comparing what you see with CSS or app layout values.
Other settings worth knowing:
Capture screen continuously during measuring - off by default, so the tool measures a single snapshot of the screen. Turn it on to measure moving content in real time, at the cost of more resources.
Draw feet on cross and Line color - purely visual, to make the lines easier to see.
A note on display scaling
If Windows is set to 125% or 150% scaling, on-screen pixels won't match the CSS pixels or design-tool units you see elsewhere. ShareX's ruler documentation makes the same point and recommends zooming the app to 100% and accounting for Windows display scaling. If your desktop itself looks wrong, see how to fix a stretched or blurry screen resolution in Windows 11.
Free alternatives
ShareX Ruler - if you already use this free, open-source screenshot tool, open Tools, then Ruler. You can nudge measurements with the arrow keys and copy them with Ctrl + C. See how it compares in PowerToys Screen Ruler vs ShareX Ruler.
PicPick - its Pixel Ruler supports horizontal and vertical orientation, pixels, inches and centimetres; it's free for personal, non-commercial use.
Just Color Picker - shows the horizontal and vertical distance between the two latest-picked pixels, handy if you're also grabbing colours. Our guide to picking colours from your screen in Windows 11 covers that side.
We round them all up in our best free screen ruler tools for Windows, and for more handy modules see the best PowerToys utilities.