How DeviceCheckOnline measures mouse DPI in a browser
DPI (counts per inch) describes how many sensor counts your mouse reports for one inch of physical movement. The browser cannot read raw counts — but it can read cursor movement in CSS pixels, then convert through `devicePixelRatio` to device pixels, and compare against the physical distance you confirm with a ruler.
Open the tool →1. The chain: count → OS → CSS pixel
On Windows at 100% scaling with Enhance Pointer Precision off and pointer speed at the 6th notch, each sensor count maps to exactly one device pixel of cursor movement. At 125% scaling, one device pixel = 1.25 CSS pixels. We multiply CSS pixel travel by `window.devicePixelRatio` to recover the count-equivalent.
2. What disables enhanced pointer precision
Windows pointer acceleration applies a non-linear curve: slow movement gets less cursor travel per count, fast movement gets more. With acceleration on, our DPI reading depends on the speed of your stroke — which makes the result useless for sensitivity calculations. We require the setting off and surface a warning when trial-to-trial spread exceeds 8% (a strong sign acceleration is still active).
3. Multi-trial median
Single drags are noisy: hand tremor, ruler reading, sub-count rounding. We accept multiple trials and report the median DPI across them. Three trials with 6 inches of travel is usually enough to get within ±2% of the marketed rate on a clean machine.
4. Limitations
Some gaming mice apply driver-level smoothing or angle-snapping. macOS does not expose a 1:1 setting equivalent to Windows. Browser sandbox prevents reading the underlying HID counts directly. For absolute calibration, hardware tools like MouseTester remain more accurate — but for the 95% case, the browser test is within 3%.
FAQ
Why does my 1600 DPI mouse measure 1280?
Almost certainly Windows scaling is on (1280 / 1600 = 0.80 = 125% inverse). If `devicePixelRatio` reads 1.25 in the tool, we already corrected — so the discrepancy is elsewhere, usually pointer-speed not at the 6th notch.
Can I use this on macOS?
Partially. macOS has no 1:1 pointer setting, so all readings are post-acceleration. Useful as a comparison between profiles, not for absolute DPI.