How measurepd.app Works
What the PD tool does with your picture, how it turns pixels into millimeters, what it was checked against and what it was not, and how to see for yourself that nothing leaves your device.
Updated
Measure your PDWhat happens on your device
The camera view and the picture stay in the page. Your pupils are found by MediaPipe Face Landmarker, an open-source face-landmark model from Google (Apache 2.0 license), version 0.10.32, running in your browser. Its program file (about 11.5 MB) and model (about 3.8 MB) are served from measurepd.app itself. A first visit downloads about 1.5 MB; these two files are downloaded only when you press Use a photo, or allow the camera after Start camera, while the page shows "Loading the pupil model on this device". The tool then keeps them on your device, so a later visit works offline.
Versions of this library from 1.0.0 on send a usage log to Google, so the site uses 0.10.32. The model runs on your device and made no request to any other site in our checks in Chrome, WebKit (the engine of Safari) and Firefox.
The camera is switched off as soon as the picture is taken, when you switch to another tab, and when you leave the page. The picture and every number are held in the page's memory only: Start over forgets them, and so does closing the tab. None of them is saved, sent, or put into a file name.
How the PD is worked out
Four steps, from the picture to the numbers:
- The card sets the scale. An ID-1 card (ISO/IEC 7810) is 85.60 mm wide, so the distance between the two card lines, in pixels, gives the millimeters per pixel at the card.
- The card sits in front of your eyes. Held flat on the brow, the card is about 12 mm closer to the camera than your pupils, so it looks a little larger than it would at their depth. The tool scales the pupils' separation up by the camera distance divided by the camera distance less 12 mm.
- Your eyes turn inward to look at the lens. Each eye turns around a point behind its front surface: 13 to 15 mm behind it in published studies, 15.3 ± 1.5 mm in one 2022 measurement; the tool uses 13.5 mm. Looking at a lens 55 cm away, for example, your pupils are therefore slightly closer together than when you look into the distance, and the tool works back to your distance PD by the camera distance plus 13.5 mm, divided by the camera distance. Near PD is then worked out the same way for a reading distance of 40 cm.
- Right and left. The tool takes the point the face model places on the bridge of your nose (it is not shown and cannot be moved), measures from it to each pupil along the line through your pupils, and scales the two parts so they add up to the distance PD. Every number is rounded to 0.5 mm on its own.
Both corrections depend on the camera distance, which a browser cannot measure: the tool uses 55 cm for a laptop or desk camera and 35 cm for a phone held in the hand, the two choices under Where is the camera?. The plus or minus figure under the result gives how far the distance PD would move if the camera was anywhere from 0.7 to 1.3 times that distance and the card anywhere from 6 to 18 mm in front of your eyes. With several pictures, it is the largest of their figures.
The result also warns you, in words, when your head is turned more than 5 degrees or tilted more than 10, when your chin is raised or lowered more than 15 degrees, when your eyes look closed, when your face is very small in the picture or fills it, when the card is less than 120 pixels wide in the picture, or when the card and the line through your pupils differ by more than 5 degrees. Each warning says what to do.
With no card: a rough range
No card at hand? uses the width of your iris, the colored part of the eye, as the scale. Iris width differs between people: in a study of 390 people the average was 11.71 mm with a standard deviation of 0.42 mm (Rüfer 2005), 3.6 percent of the width. On a PD of 63 mm that alone is about 2.3 mm either way at one standard deviation, before any other error. So the tool shows this reading only as a range, from one standard deviation below the average iris width to one above, under the heading "Rough estimate from iris size", and never as a single number. It does not apply the correction for your eyes turning toward the lens, so for that reason alone it reads about 1.5 mm low on a PD of 63 mm with the camera at 55 cm.
What it was checked against
The calculation was checked in a camera simulation written apart from the tool's own code: faces with PDs from 50 to 78 mm as points in 3-D space (each eye's center of rotation, pupils turned toward the lens, a card in front of the brow), photographed by a simulated camera with fields of view from 50 to 90 degrees, pictures from 640 to 1,920 pixels wide and the picture rotated at any angle. With the face looking straight at the camera, and the camera distance and card position the ones the tool assumes, it returned the true PD to within 0.05 mm in all 10,000 cases.
Then each assumption was made wrong on purpose, in 10,000 random cases per row. The PD was off by up to the first figure in half the cases and up to the second in 95 percent: with the camera anywhere from 0.7 to 1.3 times the chosen distance, 0.52 and 1.44 mm; with the card 6 to 18 mm in front, 0.43 and 1.02 mm; with the head turned up to 5 degrees, 0.01 and 0.04 mm (0.06 mm at most); with the pupil and card marks each off by up to 1 pixel in a picture 1,280 pixels wide, 0.29 and 0.95 mm; off by up to 2 pixels, 0.57 and 1.92 mm. In the camera-distance and card rows, the plus or minus figure the tool gave was at least as large as the error in 95 percent of cases or more.
The pupil finder was checked on 10 portraits made with an image generator: they are generated pictures, not photos of real people. They show adults of different ages and skin tones, several with beards and one wearing glasses, each holding a blank card against the brow; in one the head is turned slightly. The pupil centers and card edges were marked on each picture by looking at it, in two separate passes, and the mean of the two passes was used; the passes agreed on the pupils' separation within about 1 pixel on nine portraits and 4 pixels on one. The pupil centers the tool found were within 4.4 pixels of the marked centers, in pictures 1,280 pixels wide. With the card lines on the marked edges, the PD from the tool's pupils was within 0.8 mm of the PD from the marked pupils on the nine portraits facing the camera, and 1.5 mm on the portrait with the head turned, for which the result also showed the head-turned warning.
What this does not show. The tool has not been compared with an optician's pupillometer, or with real people whose PD an optician measured. A generated picture has no true PD in millimeters, so the portraits show where the marks land, not whether the final number matches your face. The simulation checks the arithmetic, and the portraits check the pupil finder. We found no published study of any camera-and-card web tool; the published figures for other methods are in the guide.
Automated page checks run in a browser before each release: the photo route on every portrait; moving every mark and line by dragging and with the keyboard, with the result following; three pictures giving a median and a spread; Copy result, the iris range and Start over; the camera route with a camera feed played from a file in Chrome, with the live checks, the countdown, and the camera switched off after the picture and when the page is hidden; the message for a refused camera; plain messages for a file that is not a picture, a damaged picture, a picture with no face and one with two faces; the ruler PDF's page size; each page's preset, including the near PD calculator; a first visit that downloads none of the model files; and measuring again offline after one use online. The ruler's 100 mm check line is measured in a picture of each PDF page.
Last checked 2026-11-22 in Chrome (14 page checks), Safari's engine WebKit (13) and Firefox (13); the camera feed from a file runs in Chrome only.
Limits
measurepd.app measures the distance between your pupils for ordering glasses, and gives an estimate. It is not an eye exam, it does not look at the health of your eyes or how well you see, and it does not replace an optician. For progressive lenses, lenses with prism, a strong prescription or a child's glasses, have an optician measure your PD.
It does not measure the height of your pupils in a frame (the segment height used for progressive lenses). Its makers describe the face model as made for faces looking at the camera, upright and fully in view: a face turned or tilted far, half hidden, or too far away gives worse marks. Glasses can hide or reflect over the pupils; take them off if the marks do not sit on your pupils. The portraits it was checked on show adults only.
Not tried yet: real phones in the hand, photos of real people, the printed ruler from a real printer, and a comparison with an optician's measurement.
How to check that nothing is sent
Three ways, from quickest to most thorough:
- Go offline. Measure once, so the tool keeps its files, then turn off Wi-Fi and measure again. It works the same, which could not happen if your picture had to reach a server.
- Watch the network. Open your browser's developer tools, choose the Network tab, and take a picture. The page fetches its own files from measurepd.app and, if analytics is on, sends small requests to Google Analytics. None of them carries a picture, a video frame or a number from your result. The requests to measurepd.app have no body; Google Analytics may send several events together in one short request body.
- Read the security policy. Every page is sent with a Content-Security-Policy header that tells the browser to block the page from sending data anywhere except measurepd.app and Google Analytics.
Before each release, an automated check runs the real Google Analytics script, opens a photo whose file name carries a marker, measures, and fails if the marker, the measured numbers or a piece of the photo's bytes appear in any request, or the marker or the numbers in any attribute of the page. The site has no session recording. What Google Analytics receives is listed on the privacy page.