This calculator helps estimate lens power based on pupillary distance (PD) and fitting height. Please note this is an estimation tool and not a substitute for a professional eye exam and prescription from an optometrist or ophthalmologist.
8.6 mm
8.4 mm
8.2 mm
8.0 mm
Understanding Spectacle Prescription Calculations
Spectacle prescriptions are complex and account for various factors like refractive error (myopia, hyperopia, astigmatism), lens design, and frame measurements. This calculator focuses on a simplified aspect: estimating the effect of decentration on lens power, which can be influenced by your pupillary distance (PD) and how the glasses are fitted onto your face relative to the lens center.
Key Terms:
Pupillary Distance (PD): The distance between the centers of your pupils, usually measured in millimeters (mm).
Lens Power (Diopters): The refractive power of a lens. A negative value (e.g., -2.50 D) indicates a lens for myopia (nearsightedness), while a positive value (e.g., +1.75 D) indicates a lens for hyperopia (farsightedness).
Fitting Height: The vertical distance from the bottom of the spectacle frame to the center of the pupil. This calculator uses 'Distance from Lens Center to Pupil Center' which is related but not identical to fitting height. Accurate fitting height is crucial for progressive or bifocal lenses.
Base Curve: The curvature of the back surface of the lens. It affects how the lens sits on the eye and its optical properties.
Decentration: When the optical center of a lens does not align perfectly with the center of the pupil. This can happen if the PD measurement is off or if the frame is not positioned correctly on the face.
The Math Behind This Calculator (Simplified Prentice's Rule):
This calculator uses a simplified application of Prentice's Rule to estimate induced power due to decentration. Prentice's Rule states:
Induced Power (Diopters) = Decentration (cm) × Lens Power (Diopters)
In this calculator:
We calculate the horizontal decentration for each eye by subtracting half of the PD from the distance from the lens center to the pupil center (assuming symmetrical fitting for simplicity).
We convert this decentration from millimeters to centimeters (divide by 10).
We apply Prentice's Rule to find the induced power for each eye.
The "Estimated Total Lens Power" is the original spherical lens power plus the calculated induced power. This is a very basic estimation, as astigmatism and lens curvature are not factored in.
Example: If your PD is 62mm and the distance from the lens center to the pupil is 25mm, and your spherical prescription is -2.50 D:
For one eye, the distance from the pupil center to the optical center of the lens might be 25mm - (62mm / 2) = 25mm - 31mm = -6mm. (This indicates the pupil is 6mm inward from the lens optical center).
Decentration in cm = -6mm / 10 = -0.6cm.
Induced Power = -0.6cm × -2.50D = +1.50D.
Estimated Total Lens Power = -2.50D + 1.50D = -1.00D.
This shows how decentration can alter the effective power of the lens. For significant prescriptions or complex astigmatism, precise measurements and professional fitting are critical.
When to Use This Calculator:
To gain a basic understanding of how PD and lens fitting affect spectacle power.
As an educational tool to visualize optical principles.
To highlight the importance of accurate measurements when ordering glasses.
Disclaimer: This calculator provides an approximation. Always consult with a qualified eye care professional for your prescription and for fitting advice.
function calculatePrescription() {
var pd = parseFloat(document.getElementById("pupillaryDistance").value);
var distFromCenter = parseFloat(document.getElementById("distanceFromLensCenter").value);
var sphericalPower = parseFloat(document.getElementById("lensPower").value);
var baseCurve = parseFloat(document.getElementById("baseCurve").value); // Not directly used in this simplified calculation but kept for completeness
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
if (isNaN(pd) || isNaN(distFromCenter) || isNaN(sphericalPower)) {
resultDiv.innerHTML = "Please enter valid numerical values for all fields.";
return;
}
// Calculate decentration for one eye relative to the geometric center of the lens
// Assume the lens optical center is initially at the frame's geometric center
// and pupil is offset from that.
// Decentration is the distance from the pupil center to the lens optical center.
// If lens optical center is assumed to be at the frame's midpoint,
// and PD is the distance between pupil centers, then half PD is distance from
// bridge to pupil center.
// The "distance from lens center to pupil center" is essentially asking how far
// the pupil is from the lens's optical center when fitted.
// Let's simplify: Assume the lens optical center *should* be at the pupil center.
// The input "Distance from Lens Center to Pupil Center" implies the actual
// distance between the optical center of the lens *as positioned in the frame*
// and the pupil center.
// Horizontal decentration (mm)
// This can be interpreted in a few ways. A common scenario is:
// 1. Total PD is measured.
// 2. Frame has a certain width.
// 3. Lens optical center is placed relative to the frame.
// For this simplified model, let's assume:
// – The geometric center of the lens corresponds to the optical center.
// – Half PD is the distance from the bridge to the pupil center.
// – The input "Distance from Lens Center to Pupil Center" is the deviation of the pupil
// from the lens's optical center (where it SHOULD be).
// If the input is DISTANCE FROM LENS CENTER TO PUPIL CENTER,
// it implies the pupil is NOT aligned with the lens optical center.
// Let's interpret `distFromCenter` as the horizontal distance from the optical center
// of the lens to the pupil center.
var decentrationMM = distFromCenter; // Assuming this input directly represents the horizontal offset in mm.
// Positive value means pupil is outwards from lens center, negative means inwards.
// However, the typical input for fitting height is measured downwards from the pupil.
// Let's re-interpret the input "Distance from Lens Center to Pupil Center" as the
// horizontal offset of the pupil from the optical center of the lens (in mm).
// The sign (+/-) depends on whether the pupil is nasal or temporal to the optical center.
// For simplicity, let's assume the user enters the MAGNITUDE and we determine direction.
// A more standard way to think about decentration in glasses fitting:
// The lens optical center (OC) is placed based on the frame's geometry and the wearer's PD.
// Often, the OC is placed at the geometric center of the lens blank, or adjusted based on frame measurements.
// If the lens OC is aligned with the pupil center, decentration is 0.
// If the pupil center is NOT aligned with the lens OC, there is decentration.
// Let's assume the input `distFromCenter` is the horizontal offset in mm.
// If the `pupillaryDistance` is 62mm, then pupil centers are at -31mm and +31mm from the midline.
// If `distFromCenter` is 25mm, it could mean the lens OC is positioned such that
// the pupil center is 25mm away from it. This is ambiguous.
// Let's try a common interpretation:
// PD = distance between pupils.
// Lens fitting often involves aligning the optical center of the lens with the pupil center.
// If the lens is NOT centered on the pupil, decentration occurs.
// The input "Distance from Lens Center to Pupil Center" implies the offset.
// Let's assume this is the horizontal distance in mm.
// We need to know if the pupil is nasal or temporal to the optical center.
// Let's use the PD to infer this, assuming the lens center is at the geometric center of the frame eye.
// For a given eye: Pupil center is at PD/2 from the midline.
// The lens optical center is positioned within the frame.
// If the input `distFromCenter` represents the horizontal distance from the lens optical center to the pupil center:
// If `distFromCenter` is positive, it might mean the pupil is temporally outwards from the lens OC.
// If `distFromCenter` is negative, it might mean the pupil is nasally inwards from the lens OC.
// This input is poorly defined for a generic calculator without more context on how it's measured.
// Let's use a common scenario for calculation:
// Assuming the input `distFromCenter` is the distance from the geometric center of the lens
// (where optical center might be placed) to the pupil center.
// If the pupil center is TEMPORAL (outward) from the lens center, decentration is positive (for plus lenses, this adds power).
// If the pupil center is NASAL (inward) from the lens center, decentration is negative (for plus lenses, this subtracts power).
// Let's assume `distFromCenter` is the magnitude of the offset.
// We need context to determine the sign.
// Consider the common measurement: the distance from the frame's Datum Line (often aligned with the lens OC) to the pupil.
// If the input `distFromCenter` is the horizontal distance from the optical center of the lens to the pupil center:
// Let's assume positive means temporal offset, negative means nasal offset.
var horizontalDecentrationMM;
// This is the trickiest part due to ambiguity.
// Let's assume the user is entering the distance from the lens optical center to the pupil center.
// We'll need to decide if it's nasal or temporal.
// For simplicity, let's assume the calculation is for ONE eye and the user enters the offset.
// We'll prompt for a sign or make an assumption.
// ASSUMPTION: The user is entering the distance from the lens optical center to the pupil center.
// If this value is positive, let's assume the pupil is temporally displaced from the lens optical center.
// If negative, nasally displaced.
// However, `distFromCenter` is a number input, so it won't have a sign unless typed.
// RE-INTERPRETATION based on standard lens fitting:
// PD = Pupillary Distance (center-to-center of pupils).
// Effective Diameter (ED) or Frame size.
// Optical Center (OC) placement.
// Let's assume the provided `distFromCenter` IS the horizontal offset in mm from the lens OC to the pupil center.
// If the value is positive, assume it's temporally outward. If negative, nasally inward.
// The label is "Distance from Lens Center to Pupil Center". This value's sign is crucial.
// Since it's a number input, the user must type the sign.
horizontalDecentrationMM = distFromCenter; // User must input sign (e.g., 5 for temporal, -5 for nasal)
// Prentice's Rule: Induced Power (D) = Decentration (cm) * Lens Power (D)
// Decentration must be in cm.
var decentrationCM = horizontalDecentrationMM / 10.0;
// Calculate induced power
var inducedPower = decentrationCM * sphericalPower;
// Estimated Total Lens Power is the original spherical power + induced power
var estimatedTotalPower = sphericalPower + inducedPower;
// Format the results for display
var resultHTML = "
";
resultHTML += "";
resultHTML += "(This estimation simplifies calculations and does not account for astigmatism or other factors.)";
resultHTML += "";
resultDiv.innerHTML = resultHTML;
}