Gravitational Microlensing Magnification Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Introduction

Gravitational microlensing happens when a foreground object, called the lens, passes very close to the line of sight to a more distant background star, called the source. The lens does not need to shine brightly on its own. Its gravity bends the source light and creates multiple images that are usually too close together to resolve directly. Instead of seeing separate images, observers measure a temporary brightening of the source. That is why microlensing is such a useful astronomical tool: it can reveal faint stars, brown dwarfs, planets, and even dark compact objects that might otherwise be difficult to detect.

This calculator estimates three quantities for the simplest point-lens microlensing model. First, it computes the physical Einstein radius, which sets the characteristic size of the lensing geometry. Second, it computes the peak magnification expected from the minimum lens-source separation. Third, it estimates the Einstein timescale, which is the time required for the lens to move across one Einstein radius at the chosen transverse speed. Together, these outputs give a quick first-pass picture of how strong and how long a microlensing event may be.

The tool is intended for educational use, quick checks, and order-of-magnitude planning. It is especially helpful if you want to build intuition about how lens mass, distances, alignment, and velocity affect the observed brightening. A larger lens mass generally increases the Einstein radius. A smaller impact parameter usually produces a stronger peak magnification. A slower relative velocity tends to stretch the event over more days. These trends are simple to state, but seeing them numerically often makes the physics much easier to understand.

Gravitational Microlensing and the Einstein Ring

Gravitational microlensing occurs when a massive object passes nearly in front of a distant background star. The gravitational field of the foreground lens bends the light from the source, producing multiple images whose magnified light briefly brightens the star. Unlike strong lensing by galaxies, microlensing images are so close together that they cannot be resolved with current telescopes; instead, observers see a time-dependent change in brightness. Microlensing surveys toward the Galactic bulge and the Magellanic Clouds have revealed thousands of such events, providing insights into the distribution of stellar and sub-stellar objects and offering a means to detect dark matter candidates.

Central to microlensing is the concept of the Einstein radius, the angular scale at which light from the source is significantly deflected. For a point mass lens of mass M , a lens distance D _l , and a source distance D _s , the angular Einstein radius is given by

\theta E = 4 G M D _s - D _l c ^2 D _l D _s .

In practice, astronomers often work with the physical Einstein radius R E = D _l \theta E , which typically spans a few astronomical units for stellar-mass lenses within the Milky Way. The apparent magnification of the source depends on how closely the lens and source align. Let u denote the separation between lens and source in units of the Einstein radius. The magnification for a single point lens is

A ( u ) = u ^2 + 2 u u ^2 + 4 .

When the lens passes directly in front of the star ( u = 0 ), the magnification formally diverges, though in reality the finite size of the star limits the peak brightness. For larger impact parameters, the magnification decreases rapidly. Events are typically characterized by their minimum impact parameter u _0 , which occurs at the time of closest approach. The brightness as a function of time follows a symmetric curve described by the Paczyński profile, rising as the alignment improves and falling as the lens moves away.

The Einstein radius also sets the characteristic timescale of the event. If the relative transverse velocity between lens and source is v , the Einstein timescale is t _E = R E v . For typical Galactic lenses with M on the order of one solar mass and velocities around 200 km/s, t _E ranges from days to months. Monitoring campaigns use this timescale to schedule observations and to distinguish microlensing from intrinsic stellar variability, which often occurs on different timescales.

How to Use

Enter the lens mass in solar masses, the lens distance and source distance in kiloparsecs, the minimum impact parameter u0 as a dimensionless number, and the relative transverse velocity in kilometers per second. Then press the compute button. The calculator immediately returns the Einstein radius in astronomical units, the peak magnification at closest approach, and the Einstein timescale in days.

Each input has a specific meaning. The lens mass describes the compact object doing the bending. The lens distance is the distance from the observer to that object. The source distance is the distance from the observer to the background star. The impact parameter u0 is the closest projected separation between lens and source measured in units of the Einstein radius, so smaller values mean better alignment. The relative velocity is the effective transverse speed between lens and source across the sky. Because the script converts everything internally to SI units, you can work in the displayed astronomy units without doing any manual conversions.

For physically meaningful results, the source distance should be larger than the lens distance. If the lens is placed beyond the source, the geometry no longer represents a standard microlensing configuration, and the Einstein radius expression becomes invalid. It is also wise to avoid entering exactly zero for the impact parameter, because the ideal point-source formula predicts an infinite magnification there. In real observations, finite source size, blending, and instrumental limits keep the peak finite.

Formula

The calculator uses the standard point-lens, point-source relations. The physical Einstein radius is computed from the lens mass and the observer-lens-source geometry. In the JavaScript, the mass is converted from solar masses to kilograms, distances are converted from kiloparsecs to meters, and the result is finally reported in astronomical units for readability. The peak magnification is then evaluated from the minimum impact parameter, and the event timescale is found by dividing the Einstein radius by the transverse speed.

In plain language, the formula says that stronger gravity and a favorable lensing geometry produce a larger Einstein radius. A larger Einstein radius means the lens influences light over a wider region, which usually leads to a longer event. The magnification formula depends only on the dimensionless separation u. That is why two events with very different masses can have the same peak magnification if they share the same minimum impact parameter, even though their durations may differ substantially.

It is useful to interpret the outputs together rather than in isolation. A high magnification with a very short timescale may require dense monitoring to catch the peak. A modest magnification with a long timescale may be easier to follow observationally but less dramatic in brightness. The Einstein radius itself is also informative because it gives a sense of the physical scale of the lensing zone, which matters when thinking about planetary perturbations or binary-lens structure.

Example

Suppose you enter a lens mass of 0.3 solar masses, a lens distance of 4 kpc, a source distance of 8 kpc, an impact parameter of 0.1, and a relative velocity of 200 km/s. This is a reasonable toy model for a Galactic bulge microlensing event. With these values, the Einstein radius comes out to a few astronomical units, the peak magnification is about 10, and the event timescale is on the order of a few weeks. That means the source would brighten by roughly a factor of ten at maximum and remain noticeably magnified over a timespan that is practical for repeated observations.

This example also shows why alignment matters so much. If you keep the same mass and distances but increase u0 from 0.1 to 0.5, the peak magnification drops sharply. The event still occurs, but it becomes much less spectacular. By contrast, if you keep the geometry fixed and increase the lens mass, the magnification at the same u0 does not change directly, yet the Einstein radius and timescale both increase. That distinction is important: mass mainly changes the scale and duration, while the closest alignment controls the peak brightness in the simple point-lens model.

To illustrate how the inputs affect the results, consider the example combinations listed in the table. Each row assumes a relative velocity of 200 km/s, a common value for stellar motions in the Galactic bulge. The magnification column shows the peak brightening of the source star, while the timescale indicates how long the lens takes to traverse one Einstein radius.

Lens Mass (M☉) Dl (kpc) Ds (kpc) u0 Peak A tE (days)
0.3 4 8 0.1 10.0 20
1.0 6 8 0.3 3.5 40
5.0 3 10 0.5 1.7 90
10.0 2 9 0.2 5.0 150

The table demonstrates several trends. Increasing the lens mass enlarges the Einstein radius, which lengthens the event and raises the magnification for a fixed impact parameter. Moving the lens closer to the observer also increases the radius because the geometry places the lens more centrally along the line of sight. The impact parameter exerts a strong influence: even a modest increase in u0 dramatically lowers the magnification, highlighting the rarity of high-magnification events. Survey strategies often prioritize dense star fields to maximize the chance of near-perfect alignments.

Limitations and Assumptions

This calculator uses the simplest microlensing model: a single point-mass lens and a point-like source. That approximation is excellent for learning the core relationships, but real events can be more complicated. Binary lenses, planetary companions, parallax from Earth’s motion, finite-source effects, limb darkening, and blended light from neighboring stars can all change the observed light curve. In those cases, the peak magnification and timescale from this tool should be treated as baseline estimates rather than full observational predictions.

Another important limitation is that the reported timescale is the Einstein crossing time, not necessarily the total time during which the event is detectable above a survey threshold. Real detectability depends on cadence, photometric precision, source brightness, extinction, and how much magnification is needed to stand out from noise. Similarly, the magnification formula assumes the source can be treated as a point. When the source star has a non-negligible angular size compared with the lensing geometry, the formal divergence at very small u0 disappears and the peak is smoothed out.

Finally, the calculator does not currently validate every unphysical input combination. If the source distance is less than or equal to the lens distance, or if the velocity is zero or negative, the output will not represent a realistic event. The underlying script is preserved as provided, so users should supply sensible astronomical values and interpret the results as quick theoretical estimates. For detailed research work, a full light-curve model fitted to data is the appropriate next step.

Microlensing light curves are typically symmetric and achromatic—independent of wavelength—unless additional physics is involved. Planetary companions to the lens introduce short-lived anomalies, binary lens systems create caustic crossings with sharp spikes in brightness, and finite-source effects round off the peak when u0 becomes comparable to the angular radius of the source star. Studying these deviations allows astronomers to extract rich information about planetary systems, binary star fractions, and even the sizes of distant stars.

For students and enthusiasts, experimenting with this calculator offers insight into how microlensing observables relate to the underlying physical parameters. By adjusting the lens mass or distances, one can see how the Einstein radius responds, building intuition about the scale of gravitational lensing in our Galaxy. Understanding the dependence on impact parameter and velocity sheds light on why some events last only days while others unfold over several months. With these tools, observers can plan monitoring campaigns, and theoreticians can explore the conditions under which exotic objects—like rogue planets or primordial black holes—might be detected through their fleeting gravitational fingerprints.

Enter the physical parameters below to estimate the Einstein radius, peak magnification, and event timescale for a simple point-lens microlensing event.

Enter parameters to estimate magnification and timescale.