Two questions, one page: does the cursor move while the mouse sits still, and does the sensor keep up while you move it? Nothing is installed and nothing leaves your device.
Let go of the mouse, then start — 3 seconds without touching it.
A healthy mouse sends no movement whatsoever while it sits still. If this run came back clean but the cursor still wanders in daily use, try the longer run — some sensors only twitch every so often.
Move the cursor here to draw. Hold the left button and drag for the heavier line.
Draw slowly, then quickly. Corners and straight cuts across a curve are the sensor skipping. Hold the left button while you draw: if the heavy line thins out before you let go, the button released on its own.
Both tests above watch the same thing from opposite ends: what the sensor reports when it should report nothing, and what it reports when it should be reporting everything.
An optical sensor is a tiny camera photographing your desk thousands of times a second and working out how far the picture shifted between shots. When it can find nothing to compare — or compares the wrong things — it guesses, and the guess arrives as cursor movement you never made. On a mouse standing still, that is drift.
Move quickly and the sensor has less overlap between one photo and the next. Past its limit it loses the thread, so the line jumps instead of curving. The largest jump on the pad puts a number on it — though a big gap can also be a slow report rate rather than a lost sensor.
A drag that lets go halfway across the screen is almost never a tracking problem. It is the left switch bouncing open for a millisecond under a worn spring, which the computer reads as a release. The pad counts every release that happened while the cursor was still travelling.
Turn the mouse over and look into the lens under a lamp. A single hair or a smear of grease is enough. Wipe the lens with a dry cotton bud, clear the ring of grime around it, and give the mouse a plain matte mat rather than bare desk, glass or a busy pattern.
A clean lens on a plain mat, a fresh battery or a different USB port, and the drift is still there — that is a sensor at the end of its life. Dropped drags on a mouse a few years old are the same story for the switch. Both are cheaper to replace than to live with.