Gravitational Lensing Calculator

Compute Einstein radius, deflection angle, image separation and magnification for a point-mass gravitational lens using cosmological distances.

Lens configuration

Typical galaxy lens: 10¹¹–10¹³ M☉. Cluster lens: 10¹³–10¹⁵ M☉.

Must be greater than zL.

β = 0 gives a perfect Einstein ring.

Cosmology

Flat ΛCDM assumed: ΩΛ = 1 − Ωm.

Key results

Einstein radius θE
θE in radians
Physical Einstein radius RE
Deflection angle α(θE)

Image configuration (point-mass lens)

Image positions θ±
Image separation |θ+ − θ|
Total magnification μtot
Magnifications μ+, μ

Distances (angular diameter)

DL
DS
DLS

How this gravitational lensing calculator works

This tool models a point-mass gravitational lens (also called a Schwarzschild lens) in a flat ΛCDM universe. It is designed for quick, order-of-magnitude estimates and teaching, not for precision lens modeling.

1. Cosmological distances

For a flat universe with matter density Ωm and dark energy ΩΛ = 1 − Ωm, the Hubble parameter is

\( H(z) = H_0 \sqrt{\Omega_m (1+z)^3 + \Omega_\Lambda} \)

The comoving line-of-sight distance is

\( D_C(z) = c \int_0^z \frac{dz'}{H(z')} \)

and the angular-diameter distance is

\( D_A(z) = \frac{D_C(z)}{1+z}. \)

For the lens–source separation we use

\( D_{LS} = \frac{D_C(z_S) - D_C(z_L)}{1+z_S}. \)

2. Einstein radius

For a point-mass lens of mass \( M \), the Einstein radius in radians is

\( \theta_E = \sqrt{\frac{4 G M}{c^2} \frac{D_{LS}}{D_L D_S}}. \)

The calculator reports:

  • \( \theta_E \) in radians and arcseconds,
  • the corresponding physical Einstein radius in the lens plane: \( R_E = \theta_E D_L \),
  • the deflection angle at the Einstein radius: \( \alpha(\theta_E) = \theta_E \) (for a point-mass lens, the Einstein radius satisfies this equality).

3. Image positions and magnification

The lens equation for a point-mass lens in angular units is

\( \beta = \theta - \frac{\theta_E^2}{\theta}, \)

where \( \beta \) is the unlensed source position and \( \theta \) is the image position. In units of the Einstein radius, \( y = \beta / \theta_E \) and \( x = \theta / \theta_E \), the equation becomes

\( y = x - \frac{1}{x}. \)

Solving this quadratic gives two images:

\( x_{\pm} = \frac{1}{2}\left( y \pm \sqrt{y^2 + 4} \right), \quad \theta_{\pm} = x_{\pm} \theta_E. \)

The corresponding magnifications are

\( \mu_{\pm} = \frac{1}{2} \left[ 1 \pm \frac{y^2 + 2}{y \sqrt{y^2 + 4}} \right], \quad \mu_{\text{tot}} = |\mu_{+}| + |\mu_{-}|. \)

When \( \beta = 0 \) (perfect alignment), the two images merge into an Einstein ring of radius \( \theta_E \) and the magnification formally diverges in this idealized model.

4. Units and typical values

  • Mass: you can enter either kilograms or solar masses (1 M☉ ≈ 1.9885 × 10³⁰ kg).
  • Redshifts: the source redshift must be larger than the lens redshift.
  • Source offset β:
    • in arcseconds, or
    • as a multiple of the Einstein radius (β / θE).
  • Cosmology: default values H0 = 70 km/s/Mpc, Ωm = 0.3 are broadly consistent with modern measurements.

Understanding gravitational lensing

Gravitational lensing occurs because mass curves spacetime. Light from a distant source (such as a quasar or galaxy) follows this curvature when passing near an intervening mass (the lens), causing the source to appear magnified, distorted, or multiply imaged.

Types of gravitational lensing

  • Strong lensing: produces multiple images, arcs, or Einstein rings. Typically caused by massive galaxies or clusters.
  • Weak lensing: small, coherent distortions of many background galaxies; used to map dark matter statistically.
  • Microlensing: temporary brightening of a star due to a compact lens (star, planet, black hole) passing in front of it.

What this calculator is good for

  • Estimating the Einstein radius for a given lens mass and redshift configuration.
  • Seeing how image separation and magnification change with source alignment.
  • Educational demonstrations of basic lensing physics.

Limitations

  • Assumes a single point-mass lens (no extended mass distribution, shear, or substructure).
  • Uses a simplified cosmology with numerical integration; not a full precision cosmology code.
  • Does not compute time delays, shear, or full image morphology.

FAQ

Is gravitational lensing proof of dark matter?

Lensing measurements often reveal more mass than can be accounted for by visible matter alone. This is one of the strongest lines of evidence for dark matter, especially in galaxy clusters and in systems like the Bullet Cluster. However, interpreting lensing always requires a model for the mass distribution.

Why do some lenses show arcs instead of multiple points?

When the source is extended (like a galaxy) and lies near a caustic in the lens mapping, different parts of the source are highly magnified and stretched into arcs or even complete rings. The simple point-mass model here only captures the basic angular scales, not the detailed shapes.

Can this calculator replace professional lens modeling software?

No. Professional lens modeling codes (e.g., used with Hubble or JWST data) include realistic mass profiles, external shear, multi-plane lensing, and full optimization against imaging and spectroscopic data. This calculator is intended for quick estimates and conceptual understanding.