Why you can trust ZDNET : ZDNET independently tests and researches products to bring you our best recommendations and advice. When you buy through our links, we may earn a commission. Our process

'ZDNET Recommends': What exactly does it mean?

ZDNET's recommendations are based on many hours of testing, research, and comparison shopping. We gather data from the best available sources, including vendor and retailer listings as well as other relevant and independent reviews sites. And we pore over customer reviews to find out what matters to real people who already own and use the products and services we’re assessing.

When you click through from our site to a retailer and buy a product or service, we may earn affiliate commissions. This helps support our work, but does not affect what we cover or how, and it does not affect the price you pay. Neither ZDNET nor the author are compensated for these independent reviews. Indeed, we follow strict guidelines that ensure our editorial content is never influenced by advertisers.

ZDNET's editorial team writes on behalf of you, our reader. Our goal is to deliver the most accurate information and the most knowledgeable advice possible in order to help you make smarter buying decisions on tech gear and a wide array of products and services. Our editors thoroughly review and fact-check every article to ensure that our content meets the highest standards. If we have made an error or published misleading information, we will correct or clarify the article. If you see inaccuracies in our content, please report the mistake via this form.


How to measure pixels on your screen with Screen Ruler

Part of Microsoft's PowerToys program, Screen Ruler can help web developers, programmers, and graphic artists measure specific areas and distances on the screen.
Written by Lance Whitney, Contributor
Screen Ruler measuring multiple areas.

Screen Ruler measures areas and distances on the screen.

Screenshot by Lance Whitney

Whether you're a web designer or developer, a programmer, or a graphic artist, you sometimes need to measure the number of pixels that are used by or surround specific elements on the screen. 

Maybe you want to get the size for a certain object. Maybe you need to measure a certain vertical or horizontal distance. 

Whatever the reason, one tool that can help is Screen Ruler. 

How to measure pixels on your screen with Screen Ruler

Part of Microsoft's free PowerToys, Screen Ruler will measure a square area, a cross line area, and a vertical or horizontal area. Here's how it works.

Also: How to use the free PowerToys FancyZones in Windows and why you should


If you don't already have PowerToys on your PC, download and install the PowerToysSetup.exe file from the program's GitHub page. PowerToys and its tools work the same in both Windows 10 and 11. 

1. Open PowerToys and turn on Enable Screen Ruler

Open PowerToys by double-clicking its System Tray icon. Then, select Screen Ruler in the left pane.

Make sure the switch is turned on for Enable Screen Ruler. By default, the activation shortcut to trigger Screen Ruler is Windows key+Shift+M. 

You're best off sticking with the default shortcut as it's chosen to avoid interfering with other Windows shortcut combinations. But if you need to change it, click the Pencil icon and press a different combination. The tool will tell you if you pick an invalid shortcut.

Also: The best graphic design monitors

Activation shortcut popup.

Set up Screen Ruler.

Screenshot by Lance Whitney

2. Go to Behavior and configure Screen Ruler

Next, scroll down to the section for Behavior. The first setting here for Capture screen continuously during measuring determines whether the tool continuously measures the screen or takes a single snapshot. For most results, you'll want to keep this switch turned on. However, if you're trying to measure a moving object, such as an animated GIF, or you need to take a screenshot of the measurement, then turn off this switch.

The setting for Per color channel edge detection checks if all the color channels are within a tolerance distance from each other. You can typically leave this turned off. The setting for Pixel tolerance for edge detection can help you more accurately measure certain elements on the screen. For example, Microsoft recommends increasing this value if you need to measure gradients or shadows.

The setting for Draw feet on cross adds "feet" to the cross lines, so you can better see them. And the final setting for Line color determines the color of the measurement lines. Red is the default, but you can easily change this if that color conflicts with the color of the screen.

Also: The best desktops for graphic design

Configuration options for Screen Ruler.

Configure Screen Ruler.

Screenshot by Lance Whitney

3. Drag your mouse to select the area you want to measure

Now let's check out Screen Ruler in action. Display the screen or object that you want to measure. Press the shortcut combination to trigger the tool. The Screen Ruler toolbar appears at the top of the screen with icons for the different types of measurements. To measure both the horizontal and vertical distances for a square or rectangular area, click the first icon with the dashed square symbol.

Hold down your mouse button or trackpad and drag to select the area you wish to measure. The number of pixels will change as you draw. When you've selected the exact area, note the horizontal and vertical measurements in pixels. Release your mouse button, and the selection will disappear. You can then select another area to measure the pixels.

Sample rectangular area being measured with Screen Ruler.

Measure square or rectangular area.

Screenshot by Lance Whitney

4. Use the Shift key to capture multiple areas

If you want to capture multiple areas and keep the selection and pixel measurements visible for each one, press the Shift key as you select each area. The tool will remain active, meaning you can't use your mouse or keyboard for other tasks. To exit the tool, press the Esc key on your keyboard, or click the X on the Screen Ruler toolbar.

Multiple areas being measured at once with Screen Ruler.

Measure multiple areas.

Screenshot by Lance Whitney

5. Use the cross symbol icon to measure distances between areas

Press the shortcut combination again. To measure the horizontal and vertical distances between areas on the screen, click the second icon with the cross symbol. As you move the mouse, the measurement will change depending on the screen elements above, below, to the left, and to the right of the cross lines. To modify the horizontal and vertical distances being measured, move your mouse's scroll wheel up or down.

Also: The best laptops for graphic design

Distance between areas being measured with Screen Ruler.

Measure area with cross lines.

Screenshot by Lance Whitney

6. Click the horizontal line icon to measure horizontal distance

To measure a horizontal distance, click the horizontal line icon on the toolbar. Move your mouse to measure a certain area. Move the mouse's scroll wheel up or down to modify the distance being measured.

Horizontal area being measured with Screen Ruler.

Measure horizontal area.

Screenshot by Lance Whitney

7. Use the vertical line icon to measure vertical distance

Finally, to measure a vertical distance, click the vertical line icon on the toolbar. Move your mouse to measure the area you wish to capture. Move your mouse's scroll wheel to alter the distance that you want to measure.

Vertical area being measured with Screen Ruler.

Measure vertical area.

Screenshot by Lance Whitney
Editorial standards