Photography & Media

Stereo Disparity Depth Geometry Calculator

What horizontal pixel disparity does a parallel-camera pinhole model predict at two object distances?

Measured values and planning assumptions
Supported: 0.001 to 10000.
Supported: 1 to 1000000.
Supported: 0.1 to 100000000.
Supported: 0.1 to 100000000.
Supported: 1 to 1000000; whole numbers.

Method, formula and assumptions

For calibrated rectified parallel cameras, disparity pixels = baseline x focalPixels / subject distance. Near/far disparity span subtracts the two projections; normalize by recorded width for a framing comparison.

Input definitions and supported units

  • Camera baseline (mm): Measured or assumed numerical value, from 0.001 to 10000; must be positive.
  • Calibrated focal length (pixels): Measured or assumed numerical value, from 1 to 1000000; must be positive.
  • Near subject distance (mm): Measured or assumed numerical value, from 0.1 to 100000000; must be positive.
  • Far subject distance (mm): Measured or assumed numerical value, from 0.1 to 100000000; must be positive.
  • Recorded image width (pixels): Whole-number count, from 1 to 1000000; must be positive.

Worked example with answer

60 mm baseline and 1,000-pixel focal length give 60 pixels disparity at 1,000 mm and 20 at 3,000 mm. Span is 40 pixels, or 2% of a 2,000-pixel image.

How to use the results

The focal length input is in calibrated pixels, not lens millimeters. The span shows depth-dependent disparity without imposing an arbitrary viewing-comfort rule.

Results retain full precision internally and display up to four decimal places. Very small nonzero results use scientific notation rather than appearing as zero. Check the labels before comparing values across units.

Limitations and references

Assumes rectified parallel cameras and positive distances. Toe-in, calibration errors, distortion, occlusion and display geometry are excluded.

The method is a self-contained arithmetic, geometric or explicitly stated mathematical model. There are no imported tariffs, empirical presets or equipment specifications; measured values and allowances must come from your own process.

Related planning tools

Browse all Photography & Media calculators

Creator & reviewers

Creator persona

Reviewer personas

These names are pseudonymous editorial personas used to organize Northstar's work, not separate verified contributors. Reviewer assignments describe editorial responsibilities, not completed independent reviews or professional credentials. About our editorial personas.