|Stellar Magnitude vs. Distance Calculator|
PHP Program by Jay Tanner
ENTER ONLY THREE KNOWN VALUES and LEAVE THE UNKNOWN VALUE BLANK.  This program will then compute and display the unknown value from the three given known values. The body can be a star, planet, asteroid, etc., - any object to which we apply the stellar magnitude system. The distance can be taken as being in any convenient, units, such as kilometers, miles, AUs, light years, etc., whatever you decide the units represent as long as both d1 and d2 use the same units.
Apparent Stellar Magnitude With Respect to Distance
Using the following equations, we can mathematically move a star around in space and compute its apparent brightness at any given distance from any given known starting values. This also allows us to mathematically compare the relative brightness of any two stars side-by-side at any common distance. For example, we might wish to compute how bright a star our sun would appear to be in the sky of a planet orbiting a star 134 light years away or how the brightness of the sun would compare with another star, side-by-side, at any given distance.
m1 = Apparent magnitude of a star as viewed from distance d1
m2 = Apparent magnitude of the same star as viewed from distance d2
The distance can be in any convenient units, such as AUs, light years, etc.
The relationship between apparent magnitude and distance may be expressed in terms of any of the four variables according to the following equations where each variable is defined in terms of the other three.
Using any convenient units of distance, the general mathematical relationship between stellar magnitude and distance may be expressed as:
From which it follows that:
The Basic Mathematics Of The Stellar Magnitude Ranking System
Stellar magnitude 3 is fainter than magnitude 1, which may seem odd at first glance. This is because stellar brightness is generally measured in units referred to as magnitudes, which are analogous to ranks.
1st magnitude is to 3rd magnitude as 1st prize is to 3rd prize. This is why magnitude 1 is brighter than magnitude 3 and magnitude 0 is even brighter than magnitude 1 and magnitude −1 is even brighter yet!
Given a set of stellar magnitudes, the object with the greatest numerical value is always the faintest of the set and the lowest magnitude value indicates the brighest object. Negative magnitudes always indicate very bright objects, for example, sun at
Here, the distances to the stars can be ignored. We do not need to think about the distances when simply ranking stars by their relative apparent brightness in the sky as we see them from Earth. However, when we start to move around in space or compare stars to each other, as if side-by-side, then we will have to consider their distances too.
The stellar magnitude system is designed mathematically so that a difference of exactly
The general relationship between apparent difference in magnitude vs apparent ratio in brightness may be expressed by the simple equation
Numerical Example of Computing the Brightness Ratio Between Two Objects
Given the apparent magnitudes of two astronomical objects (e.g, stars, planets, etc.), Equation 6 computes their comparative brightness ratio.
The brightness ratio (b) between the brighter and fainter object can be found by:
dm = (m2) − (m1) = (+4.108) − (-1.904) = +6.012 b = k ^ (+6.012) = 253.980281This means that an object with magnitude
an object of magnitude
Jay Tanner - PHP Science Labs 2023 - v2.60