Online Ruler

Screen-calibrated virtual ruler — measure accurately in centimeters and inches right on your screen.

🔧 Virtual Screen Ruler
Click and drag on the ruler to measure. Calibrate DPI for accuracy.
💡 Typical: Laptop 96–120 DPI | Retina 220+ DPI | Mobile 300–440 DPI
Measured Length
0.00 cm
In Other Unit
0.00 in
👆 Click a point on the ruler, then drag to the end of what you're measuring.

🃏 Credit Card Calibration (most accurate)

220 px
← Credit Card Width →
📋 How to Use the Online Ruler
  1. Set your screen DPI — Enter your monitor's DPI in the field above for accurate measurements. Find it in your display settings or manufacturer's spec sheet.

  2. OR calibrate with a credit card — Place a real credit card against the screen and drag the calibration slider until the yellow bar matches the card's width exactly, then click "Set Calibration."

  3. Choose your unit — Click CM for centimeters or INCH for inches. The ruler updates instantly.

  4. Measure your object — Place the object flat against your screen. Click on the ruler at the starting edge, then drag to the end edge. The measurement appears instantly below.

  5. Read the result — The measured length shows in both centimeters and inches simultaneously.

📐 About This Online Ruler

This online ruler is a free, browser-based virtual ruler that lets you measure real-world objects directly on your screen. Unlike a simple image of a ruler, our screen ruler is calibrated to your display's pixel density (DPI), ensuring that measurements in centimeters and inches are as accurate as possible without any hardware.


The tool supports both metric (cm) and imperial (inch) units and includes a credit card calibration feature — the most reliable way to get accurate readings on any screen. Whether you're a student, designer, engineer, or just need a quick measurement without digging out a physical ruler, this ruler in cm and inches has you covered. It works on desktops, laptops, tablets, and mobile phones. No app download needed — just open the page and measure.

❓ Frequently Asked Questions
The accuracy depends on your screen's DPI (dots per inch). By default we use a common DPI of 96, but you can calibrate the ruler by entering your screen's actual DPI or by using the credit card calibration method for best results.
Use the credit card calibration: place a standard credit card (85.6 mm wide) against your screen and drag the slider until the yellow bar matches the card width. Then click "Set Calibration." Alternatively, enter your monitor's DPI in the DPI field manually.
Yes! Click the CM or INCH button above the ruler to instantly switch between centimeter and inch measurements. The ruler redraws in real time and your current measurement updates automatically.
Yes, the virtual ruler works on mobile browsers including Chrome and Safari. For best accuracy on mobile, enter your phone screen's DPI (found in the manufacturer's specs) in the DPI calibration field, as mobile screens often have very high pixel densities (300–440 DPI).
The ruler spans the full width of your browser window. On most desktop monitors at 1920px width with a DPI of 96, this is approximately 50 cm or 20 inches. You can scroll the ruler area horizontally if needed.