Hertzsprung-Russell Diagram Classifier
Enter a star's surface temperature and luminosity to get its full Morgan-Keenan spectral classification and H-R diagram position.
🌟 What is the Hertzsprung-Russell Diagram Classifier?
The Hertzsprung-Russell (H-R) diagram is a scatter plot of stellar luminosity versus surface temperature, the most important diagram in stellar astronomy. Stars cluster in well-defined regions: a diagonal main sequence where hydrogen-burning dwarfs live, a giant branch to the upper right, a supergiant zone at the very top, and a white dwarf sequence at the lower left. This classifier takes a star's temperature and luminosity and returns its full Morgan-Keenan (MK) spectral classification, pinpointing exactly where the star sits on the diagram.
The spectral type letter (O, B, A, F, G, K, M) comes from the surface temperature. O and B are hot blue stars; A and F are white to yellow-white; G (including the Sun) are yellow; K are orange; M are cool red stars. Within each letter, a numeral 0-9 gives finer resolution (0 = hottest, 9 = coolest within the type). The Sun is G2. This notation, developed by Annie Jump Cannon at Harvard in the early 1900s, encodes the strength of spectral absorption lines, which depend directly on photospheric temperature.
The luminosity class Roman numeral (Ia, Ib, II, III, IV, V, D) distinguishes stars of the same temperature that occupy very different positions on the diagram. A K5V and a K5III both have orange-colored photospheres near 4,000 K, but the K5V is a main-sequence star like our Sun's future, while the K5III is a giant 10-100 times larger. Luminosity class reveals the evolutionary state: V = main sequence (hydrogen burning), IV = subgiant (transitioning), III = giant, II = bright giant, Ib = supergiant, Ia = bright supergiant, D = white dwarf remnant.
This calculator also outputs the absolute magnitude (M = 4.83 - 2.5 log10(L/L☉)), which is used by astronomers to determine stellar distances via the distance modulus, and a color description based on the temperature band. It is used in introductory astronomy and astrophysics courses to verify manual classifications, explore how temperature and luminosity determine stellar identity, and build intuition about the H-R diagram before studying stellar evolution in detail.
📐 Formula
📘 How to Use This Calculator
Steps
💡 Example Calculations
Example 1 - The Sun
T = 5,778 K, L = 1 L☉ (our Sun)
Example 2 - Red Supergiant
T = 3,500 K, L = 100,000 L☉ (Betelgeuse-type)
Example 3 - Sirius A (Hot Main-Sequence Star)
T = 9,940 K, L = 25.4 L☉ (Sirius A)
❓ Frequently Asked Questions
🔗 Related Calculators
What is the Hertzsprung-Russell diagram and what does it show?
The Hertzsprung-Russell (H-R) diagram is a scatter plot of stellar luminosity versus surface temperature, with luminosity increasing upward and temperature increasing left to right. Stars cluster in distinct regions: the diagonal main sequence, the giant branch, the supergiant region at the top, and the white dwarf sequence at the lower left. The diagram reveals a star's evolutionary state, size, and internal physics from just two observable quantities.
What do the spectral types O B A F G K M mean?
The Morgan-Keenan spectral sequence (OBAFGKM) orders stars by surface temperature from hottest to coolest. O-type stars exceed 30,000 K and appear blue-violet. B-type are blue-white (10,000-30,000 K). A-type are white (7,500-10,000 K). F-type are yellow-white (6,000-7,500 K). G-type, including the Sun, are yellow (5,200-6,000 K). K-type are orange (3,700-5,200 K). M-type red dwarfs and giants are below 3,700 K.
What are luminosity classes in the Morgan-Keenan system?
Luminosity classes refine spectral classification by indicating the size and evolutionary state of a star: Ia (bright supergiants, logL above 5), Ib (supergiants, logL 4-5), II (bright giants), III (giants), IV (subgiants), V (main sequence dwarfs), and D or VII (white dwarfs). Two stars with identical spectral type can differ enormously in radius and luminosity if they have different luminosity classes.
What spectral type is the Sun?
The Sun is classified as G2V. The G indicates a yellow star with surface temperature 5,200-6,000 K (the Sun is 5,778 K). The numeral 2 places it near the hotter end of the G range (0 = hottest, 9 = coolest within the type). The V indicates it is a main-sequence dwarf, fusing hydrogen in its core. Its absolute magnitude is +4.83 and its luminosity is by definition 1 L☉.
How does this classifier determine the luminosity class?
The classifier uses the logarithm of luminosity and surface temperature together to place the star in one of the standard H-R diagram regions. Stars with logL above 5 are bright supergiants (Ia), logL 4-5 are supergiants (Ib), logL 3-4 below 25,000 K are bright giants (II), logL 1.5-3 below 12,000 K are giants (III), logL 0.5-1.5 in the 5,000-8,000 K range are subgiants (IV), and very hot low-luminosity stars are classified as white dwarfs.
What is the difference between a giant and a supergiant star?
Giants (luminosity class III) are stars that have left the main sequence and expanded as hydrogen in the core is depleted. They are typically 10-100 times the solar radius and 10-1000 times the solar luminosity. Supergiants (Ia and Ib) are the most luminous and massive stars, often 100-1500 times the solar radius and 10,000 to over 1,000,000 times the solar luminosity. Betelgeuse is a famous M-type supergiant with roughly 700 solar radii.
What is absolute magnitude and how is it related to luminosity?
Absolute magnitude M is the apparent magnitude a star would have at a standard distance of 10 parsecs (32.6 light-years). It is related to luminosity by M = 4.83 - 2.5 log10(L/L☉), where 4.83 is the Sun's absolute magnitude. A decrease of 1 in M corresponds to a factor of 2.512 increase in luminosity. The most luminous stars have very negative M (Eta Carinae is about -7), while faint red dwarfs can reach M = +16.
Can this classifier identify white dwarf stars?
Yes. White dwarfs are identified by a combination of high surface temperature (above 5,000 K) and very low luminosity (logL below -1). A typical young white dwarf at 25,000 K and 0.007 L☉ is classified as D (white dwarf). They are the compact remnants of stars that have shed their outer envelopes and are slowly cooling over billions of years. Their small radius (roughly Earth-sized) causes the low luminosity despite the high temperature.
What is a subgiant star?
Subgiants (luminosity class IV) are stars slightly above the main sequence that have begun to exhaust their core hydrogen and are expanding toward the giant branch. They are 1.5-4 times more luminous than main-sequence stars of the same spectral type. The Sun will become a subgiant in about 5 billion years before expanding into a red giant. Subgiants occupy a narrow band between the main sequence (V) and the giant branch (III) on the H-R diagram.
Why does the H-R diagram have a diagonal main sequence?
On the main sequence, more massive stars have higher core pressures and temperatures, burning hydrogen faster and generating more luminosity. They also have hotter photospheres. This creates a diagonal band: more massive (hotter, bluer) stars are in the upper-left, and less massive (cooler, redder) stars are in the lower-right. The main sequence is essentially a mass sequence for hydrogen-burning stars, spanning from 0.08 solar masses (bottom of M type) to over 100 solar masses (top of O type).
What is the Morgan-Keenan (MK) luminosity classification system?
The MK system, developed by William Morgan and Philip Keenan at Yerkes Observatory in 1943, classifies stellar spectra by two parameters: spectral type (temperature, indicated by a letter O through M and a numeral 0-9) and luminosity class (evolutionary state, indicated by Roman numerals I through V and D for white dwarfs). A full MK designation like G2V completely describes a star's position on the H-R diagram using only spectroscopic data, without requiring a distance measurement.
How do astronomers use the H-R diagram in practice?
Astronomers use H-R diagrams of star clusters to determine cluster ages: the point where stars leave the main sequence (the turnoff point) gives the age because more massive stars evolve off the main sequence first. Individual star spectra are compared against standard MK templates to assign types. The MK class then predicts the absolute magnitude (luminosity), which combined with apparent magnitude gives the distance via the distance modulus: d = 10^((m-M+5)/5) parsecs.