Screen Coordinates Guide: How to Find Mouse Position, Pixel Location & Screen Center
Screen coordinates are the X/Y numbers behind every click, drag, and animation on your monitor. If you have ever debugged a UI, written an automation script, or tried to center something to the pixel, you already deal with them — you just might not know the details yet. We cover the basics below: how the coordinate system works, how to track your mouse position, how to measure pixels, and how to find the center of any screen.
Open the Free Screen Coordinates ToolWhat Are Screen Coordinates?
A screen coordinate is a pair of numbers (X, Y) that pinpoints a location on your display. Every window, button, cursor, and pixel has one — software uses these addresses to draw things in the right place.
The idea comes from math class: on a graph you locate points with (X, Y) distances from the origin (0, 0). Screens borrowed this, with one twist: the Y-axis points downward. So the origin sits at the top-left corner, not the bottom-left.
Remember: Screen coordinates measure from the top-left. X goes right, Y goes down.
The Computing Coordinate System (Inverted Y)
If you are used to graphing equations on paper, screen coordinates feel backward at first. On a typical 1920 x 1080 monitor the layout looks like this:
| Position | X Value | Y Value | Description |
|---|---|---|---|
| Top-left corner | 0 | 0 | The origin of the primary display |
| Top-right corner | 1919 | 0 | Far right edge (width minus one pixel) |
| Bottom-left corner | 0 | 1079 | Bottom edge (height minus one pixel) |
| Bottom-right corner | 1919 | 1079 | Diagonal opposite of the origin |
| Exact center | 960 | 540 | Width / 2, Height / 2 |
Notice that the maximum values are one less than the resolution. A 1920-pixel-wide screen has valid X coordinates from 0 to 1919, because zero counts as the first position. This off-by-one detail matters when you write automation scripts that click near screen edges.
Why Does the Y-Axis Point Down?
Blame early CRT hardware. Text and graphics were drawn top to bottom, line by line, so it made sense to count Y downward through the display buffer. Every major OS — Windows, macOS, Linux — and every web browser still follows this convention.
Screen vs Client vs Page Coordinates
Not every coordinate system starts at the top-left of your physical monitor. Depending on the task, you run into three different reference frames:
| Type | Origin | Typical Use Case |
|---|---|---|
| Screen (Global) | Top-left of the primary monitor | Desktop automation (AutoHotkey, PyAutoGUI), OS macros |
| Client (Viewport) | Top-left of the browser viewport | JavaScript event handling (clientX), web UI positioning |
| Page (Document) | Top-left of the full HTML document | Scrolling-aware web elements, full-page screenshots |
For example, when you read event.clientX in JavaScript, you get the distance from the left edge of the visible browser window, not the left edge of your monitor. If the browser window is positioned 200 pixels from the left of your screen and you click at monitor coordinate (500, 300), clientX will report 300. If you need the global screen coordinate, you use event.screenX instead.
// JavaScript example: comparing coordinate types
element.addEventListener('click', (e) => {
console.log('Screen:', e.screenX, e.screenY); // relative to monitor
console.log('Client:', e.clientX, e.clientY); // relative to viewport
console.log('Page: ', e.pageX, e.pageY); // relative to document
});
How to Track Mouse Coordinates on Screen in Real Time
Tracking your cursor live comes in handy for macro recording, game dev, UI debugging, and design QA. Two reliable approaches: a dedicated web tool or your OS built-in utilities.
Mouse Position Tracker: Following Your Cursor in Real Time
The fastest way to get precise, copyable coordinates — no install needed.
- Open the Screen Coordinates Tool in Chrome, Edge, or Firefox.
- Press
F11to enter fullscreen mode. This removes browser chrome (tabs, address bar, bookmarks) so the coordinates reflect your actual screen, not the smaller viewport. - Move your mouse anywhere. The X and Y values update instantly and are displayed in large, readable text.
- Click to lock a coordinate, or use the history panel to record multiple positions for later reference.
Tip: Browser zoom (Ctrl + Plus) changes CSS pixel size but does not change the underlying monitor coordinate grid. Always reset zoom to 100% before recording coordinates for automation scripts.
Show Mouse Coordinates on Screen Windows 11
Windows: Open the classic Paint app, paste a full-screen screenshot (PrtSc then Ctrl+V), and hover over the image. Paint shows live X, Y coordinates in the bottom-left status bar. This only works on static screenshots, not live desktop motion.
macOS: Press Cmd + Shift + 4. Your cursor becomes a crosshair with live X, Y numbers displayed beside it. Press Esc to cancel without capturing a screenshot. Note that macOS Retina displays report logical coordinates by default, not physical pixels.
Pixel Location Finder: Measuring Exact Points on Screen
A 4K monitor packs over 8 million pixels. Finding the exact one you need is tricky — whether you are calibrating a color bot, checking pixel-perfect UI alignment, or mapping targets for image-recognition automation.
How to Find the Exact Pixel Location of Any Point on Screen
- Capture a static reference. Take a full-screen screenshot using
PrtSc(Windows) orCmd + Shift + 3(Mac). This freezes the visual state you want to measure. - Open the measurement tool. Launch the Screen Coordinates Tool in a browser tab.
- Paste the screenshot. Press
Ctrl+V(orCmd+Von Mac) to load your screenshot into the tool as a static background. - Hover precisely. Because the image is frozen, you can take your time moving the cursor to the exact target pixel without worrying about dynamic elements (hover menus, animations) shifting under your cursor.
- Record the values. Write down the X and Y output, or use the tool's coordinate-lock feature to save the position.
Measuring Pixel Distance Between Two Points
Even after careful measurement, automation scripts sometimes click the wrong spot. The most common causes are:
- Browser chrome changes. Showing or hiding the bookmarks bar shifts the entire webpage down by roughly 30-40 pixels. Always measure with the same browser state you plan to use in production.
- Responsive layout reflow. Resizing the browser window, even slightly, can cause CSS media queries to kick in and reposition elements. Record coordinates at the exact target viewport size.
- OS-level display scaling. If Windows scaling is set to 125% or 150%, the logical coordinates your script sees may differ from the physical pixels your monitor displays. See our technical guide for a full explanation.
Screen Center Finder: How to Calculate the Middle of Any Monitor
Finding the exact mathematical center of a display is a common requirement for FPS crosshair overlays, modal dialog positioning, splash-screen alignment, and multi-monitor calibration. How resolution changes the center coordinate is covered in our Screen Resolution Comparison guide.
Step-by-Step: How to Calculate the Center of Any Screen
Center X = Total Screen Width / 2
Center Y = Total Screen Height / 2
For a standard 1920 x 1080 monitor, the center pixel is at (960, 540). For a 2560 x 1440 display, it is (1280, 720). For 4K (3840 x 2160), it is (1920, 1080).
1920x1080 Screen Center Coordinates: (960, 540)
The most common monitor resolution is 1920 x 1080 (Full HD). To find the center of a 1920x1080 screen, divide the width by 2 and the height by 2. The exact center coordinates are (960, 540). This is the midpoint pixel for positioning crosshairs, centering modals, or aligning splash screens on standard 1080p displays.
2560x1440 Screen Center Coordinates: (1280, 720)
For QHD (1440p) monitors with a resolution of 2560 x 1440, the center coordinates are (1280, 720). This resolution is popular among gamers and creative professionals who need more screen real estate than 1080p without the performance demands of 4K.
3840x2160 (4K) Screen Center Coordinates: (1920, 1080)
Ultra HD 4K displays at 3840 x 2160 have center coordinates of (1920, 1080). Interestingly, the center of a 4K screen matches the full resolution of a 1080p monitor. This makes 4K ideal for pixel-doubled scaling while maintaining sharp text and UI elements.
| Resolution | Width | Height | Center (X, Y) |
|---|---|---|---|
| HD (720p) | 1280 | 720 | (640, 360) |
| Full HD (1080p) | 1920 | 1080 | (960, 540) |
| QHD (1440p) | 2560 | 1440 | (1280, 720) |
| 4K UHD | 3840 | 2160 | (1920, 1080) |
| Ultrawide (3440x1440) | 3440 | 1440 | (1720, 720) |
Why the Mathematical Center Might Feel "Off"
Sometimes the calculated center does not line up with what your eyes tell you. A few reasons:
- Taskbars and docks. If you are not in fullscreen mode, the OS taskbar (Windows) or Dock (macOS) reduces the usable window area. The center of your browser window will be higher than the center of the physical screen.
- Monitor bezels. In multi-monitor setups, thick bezels create an optical gap that can make the physical center of a single monitor feel slightly shifted.
- Curved or ultrawide displays. The human visual system is trained for flat, roughly 16:9 rectangles. A 21:9 ultrawide screen can make a geometrically centered element feel too far to the left or right.
Tip: Always use fullscreen mode (F11 in most browsers) when measuring the true hardware center. This strips away OS chrome and gives you coordinates relative to the raw display.
Related: Need a dedicated tool just for finding screen centers? Use our Screen Center Finder — it auto-detects your resolution and instantly marks the exact center pixel with a crosshair.
Screen Coordinates on Windows 11: How to Find Mouse Position
Windows 11 gives you several ways to find coordinates and track mouse position. Quick one-off measurement or continuous live tracking — pick what suits you.
Method 1: Use the Built-In Screen Coordinates Tool (No Install)
No install needed — just open a tool in your browser.
- Open the Screen Coordinates Tool in Chrome, Edge, or Firefox.
- Press
F11to enter fullscreen mode for the most accurate readings. - Move your mouse anywhere on screen. The X and Y values update in real time.
- Click to lock a coordinate, then copy the values directly into your script or notes.
Tip: Always measure in fullscreen mode for the most accurate coordinates. This strips browser chrome (tabs, address bar, bookmarks) so the numbers reflect your actual display, not the smaller viewport.
Method 2: Find Mouse Coordinates with PowerShell
Prefer the command line? PowerShell can read mouse position via the Windows API:
Add-Type -AssemblyName System.Windows.Forms
$pos = [System.Windows.Forms.Cursor]::Position
Write-Output "Mouse X: $($pos.X), Mouse Y: $($pos.Y)"
Run this in PowerShell and it prints your mouse position instantly. Wrap it in a loop if you want continuous tracking.
Method 3: Get Screen Coordinates with AutoHotkey on Windows 11
AutoHotkey can show live coordinates with a few lines:
; AutoHotkey v2: Show mouse coordinates in a tooltip
#Requires AutoHotkey v2.0
#Persistent
SetTimer ShowCoords, 100
ShowCoords() {
MouseGetPos &x, &y
ToolTip "X: " x " Y: " y
}
Save as .ahk and double-click to run. A tooltip follows your cursor with live X/Y values.
Windows 11 DPI Scaling Warning: If your Display Settings show 125% or 150% scaling, browser-based tools and OS-level automation tools may report different numbers. See our technical guide for how to handle DPI scaling correctly.
Multi-Monitor Setups & Negative Coordinates
When you connect multiple displays, Windows and macOS treat them as one continuous virtual canvas rather than isolated islands. This has important implications for coordinate values. For a complete guide with coordinate diagrams and formulas for every layout, see our Multi-Monitor Coordinate System guide.
The Virtual Desktop Model
Picture two 1920 x 1080 monitors side by side. If the left one is primary, its top-left is (0, 0) and top-right is (1919, 0). The right monitor then starts at (1920, 0) and ends at (3839, 1079). Drag your mouse across the bezel and it feels seamless, because the OS maps both onto one big grid.
Negative Coordinates Explained
Now flip it: make the right monitor primary. Its top-left becomes (0, 0). The left monitor, sitting to the left of the origin, now has negative X coordinates from -1920 to -1. Place a monitor above the primary and its Y coordinates go negative.
This catches people out the first time. A script that assumes all coordinates are positive will break the moment a window lands on a left-side secondary monitor. Handle negative values in your code:
# Python PyAutoGUI example: safe click with negative coordinates
import pyautogui
x, y = -400, 300 # target on a monitor to the left of primary
# PyAutoGUI can click negative coordinates on Windows,
# but you should verify the target is within the virtual desktop bounds.
screen_w, screen_h = pyautogui.size()
# Note: pyautogui.size() returns the *primary* monitor size,
# not the full virtual desktop. For multi-monitor, consider
# using the `pyautogui` size as a sanity check only.
Common Mistakes & Troubleshooting
Even experienced developers hit these snags. Quick reference for the most common ones:
| Symptom | Root Cause | Solution |
|---|---|---|
| Coordinates are off by ~30 pixels vertically | Browser bookmarks bar shown/hidden | Measure with the same browser chrome state every time |
| Script throws "out of bounds" on edge clicks | Using width/height as max coordinate instead of width-1/height-1 | Valid range is 0 to (resolution - 1) |
| 4K coordinates do not match 1080p script | DPI scaling or Retina logical vs physical pixels | Check OS scaling and device pixel ratio |
| Negative coordinates break automation | Multi-monitor setup with secondary monitor left of primary | Handle negative X/Y in your coordinate logic |
| Coordinates differ between browsers | Different zoom levels or OS scaling per monitor | Reset zoom to 100% and use the same monitor |
| Centered element looks visually off | Taskbar/Dock reducing usable area, or ultrawide aspect ratio | Measure in fullscreen mode |
Frequently Asked Questions
What is the difference between absolute and relative coordinates?
Absolute (screen) coordinates measure from the top-left of your physical monitor. They are used by OS-level automation tools like AutoHotkey and PyAutoGUI. Relative (client) coordinates measure from the top-left of a specific window or viewport. They are used by JavaScript and web testing frameworks like Selenium.
Can I use screen coordinates on a touchscreen device?
Yes. Touch events report coordinates just like mouse events. On Android and iOS, touch coordinates are measured in CSS pixels relative to the viewport by default. For native app automation, you use the device's physical pixel grid.
Why do my coordinates change when I move a browser window to a different monitor?
screenX and screenY are relative to the entire virtual desktop. Moving a browser window to a monitor on the left shifts the origin of the browser's viewport, so the same click inside the window will report different global coordinates. clientX and clientY stay the same because they are relative to the browser viewport, not the monitor.
How do I convert between CSS pixels and physical pixels?
Use the browser's window.devicePixelRatio. If DPR is 2 (common on Retina Macs), then 1 CSS pixel equals a 2x2 block of physical pixels. The conversion is: Physical = CSS * devicePixelRatio. See our technical deep dive for platform-specific nuances.
Is there a way to copy coordinates directly to my clipboard?
Yes. The Screen Coordinates Tool includes a copy button next to each displayed value. You can also click anywhere on the screen to lock a coordinate, then use Ctrl+C to copy the locked pair.