Stellar Spectral Types: OBAFGKM, Lines, and HR Diagram

Table of Contents

What Is Stellar Spectral Classification (OBAFGKM)?

Stellar spectral classification is the system astronomers use to sort stars by their surface temperature and key observable features in their spectra. The iconic sequence—O, B, A, F, G, K, M—orders stars from hottest to coolest. If you have ever heard the mnemonic “Oh Be A Fine Girl/Guy, Kiss Me,” that’s a memory aid for this temperature sequence. In modern usage, more inclusive phrases are often used, but the sequence itself remains standard because it tightly correlates with stellar physics.

Hertzsprung-Russell Diagram - ESO
In the Hertzsprung–Russell diagram the temperatures of stars are plotted against their luminosities. The position of a star in the diagram provides information about its present stage and its mass. Stars that burn hydrogen into helium lie on the diagonal branch, the so-called main sequence.
Attribution: ESO

Every letter class is further divided into subtypes numbered 0 through 9 (e.g., A0 to A9), and paired with a luminosity class (e.g., dwarf/main-sequence stars are class V; giants are class III; supergiants are class I). Together, designations like G2V (the Sun’s spectral type) tell us both the star’s temperature and its size/evolutionary stage. We explore the luminosity classes in the MK system section, and the evolutionary context in the Hertzsprung–Russell diagram discussion.

Why does this matter? Spectral type underpins nearly everything we do in stellar astronomy:

  • It links directly to effective temperature and approximate color.
  • It constrains mass and luminosity on the main sequence.
  • It signals the dominant spectral lines (hydrogen, helium, metal lines, or molecular bands) visible in a star’s spectrum.
  • Combined with luminosity class, it places a star on the HR diagram and thus indicates its evolutionary phase.

In practice, spectral classification provides a shared language: an O9.5V is a hot, massive, main-sequence star; an M5III is a cool giant with prominent molecular bands. This consistency fuels everything from cataloging nearby stars to mapping the structure of the Milky Way.

Memory hook: “OBAFGKM” orders stars from hottest (blue) to coolest (red).
Inclusive alternatives exist, but the sequence itself is a physics-driven standard.

How Spectral Lines Reveal Temperature and Composition

Spectral classification is not guesswork about color. It relies on spectral lines—the discrete fingerprints of atoms, ions, and molecules in a star’s photosphere. Spectral lines strengthen or weaken with temperature for well-understood reasons: excitation and ionization states shift with available thermal energy, and different species become detectable (or disappear) in cooler or hotter conditions. Gravity and pressure also matter, broadening or narrowing lines and changing their depths, which is why luminosity class ties into the full classification.

Here is a quick tour across the OBAFGKM sequence, highlighting diagnostics commonly used in classification:

  • O-type (≈30,000–50,000+ K): Spectra show ionized helium (He II) lines and strong UV flux. Hydrogen Balmer lines are present but not at their peak strength. Metal lines are weak; very high ionization states (e.g., N III, Si IV) may appear. Some O stars show emission features denoted with suffixes (e.g., “f” for N III and He II emission).
  • B-type (≈10,000–30,000 K): Neutral helium (He I) lines appear prominently in early B types, then weaken toward later B. Hydrogen Balmer lines strengthen as we approach A types.
  • A-type (≈7,500–10,000 K): Balmer hydrogen lines reach maximum strength (near A0). Metal lines begin to strengthen. Classic bright A stars like Vega show extremely strong H lines.
  • F-type (≈6,000–7,500 K): Hydrogen lines weaken from their A-type peak; metal lines (e.g., Fe I, Fe II) and Ca II H & K strengthen. The transition from A to F is marked by the increasing prominence of ionized metals.
  • G-type (≈5,200–6,000 K): Strong metal lines and the G band (CH absorption near 430 nm). The Sun (G2V) is the archetype. Ca II H & K are strong; many neutral metal lines crowd the visible spectrum.
  • K-type (≈3,700–5,200 K): Metal lines remain strong; molecular features begin to appear. Colors are orange to red. These are among the most common bright stars in the local solar neighborhood.
  • M-type (≈2,400–3,700 K): Molecular bands dominate—especially TiO; VO and other molecules appear as we go cooler. Hydrogen lines are weak. M dwarfs are numerous and long-lived.

As temperatures decrease, molecules can form and survive in the cooler photosphere, which is why late-type spectra (K, M) display rich molecular bands. Conversely, very hot atmospheres strip electrons from atoms, changing which lines are visible, hence He II in O stars and strong Balmer lines in A stars. The combination of these temperature-sensitive line diagnostics with pressure-induced line shapes allows classification specialists to differentiate a G2V dwarf from a G2III giant using the same physics but different gravity regimes.

Several additional line behaviors are often used:

  • Line broadening: High pressure in dwarfs (class V) yields broader lines than in giants (class III) because of higher surface gravity.
  • Chromospheric activity: Ca II H & K cores can show emission reversals in active stars.
  • Rotational broadening: Fast rotators display “nebulous” (n) lines; descriptors like “nn” emphasize extreme broadening.
  • Chemical peculiarities: Ap, Bp stars (peculiar A and B) show anomalous line strengths due to diffusion processes and magnetic fields. Suffixes like “p” denote peculiarity.

These diagnostics are codified in the classification schemes, chiefly the MK system, which uses standard stars as benchmarks.

The Morgan–Keenan (MK) System and Luminosity Classes

The Morgan–Keenan (MK) system, developed in the mid-20th century and refined over decades, is the dominant framework for spectral classification. It assigns each star two key identifiers:

  • Temperature class: O, B, A, F, G, K, M (with subtypes 0–9).
  • Luminosity class: Roman numerals indicating surface gravity and size, which correlate with evolutionary state.

Luminosity classes are:

  • I — Supergiants (Ia very luminous; Ib less luminous; sometimes Ia-0 for hypergiants)
  • II — Bright giants
  • III — Giants
  • IV — Subgiants
  • V — Dwarfs (main sequence)

In some literature, VI is used for subdwarfs (low-metallicity, high-gravity), while white dwarfs are handled by a separate letter system (see Beyond OBAFGKM).

Examples:

  • G2V — A Sun-like main-sequence star with strong metal lines and moderate surface gravity.
  • B1Ia — A very luminous blue supergiant, showing strong He I lines and features indicative of low gravity.
  • M5III — A cool red giant with prominent TiO bands and narrower metal lines due to lower gravity.

The MK system is fundamentally morphological: classifiers compare a star’s spectrum to standard templates that define each subtype and luminosity class. This approach, tied to stable reference standards, ensures continuity and reproducibility across generations of observers and instruments.

Common suffixes and qualifiers include:

  • e — Emission lines present (e.g., Be stars).
  • p — Peculiar spectrum (e.g., chemically peculiar Ap stars).
  • n — Broadened (nebulous) lines due to rapid rotation.
  • f — O stars with N III and He II emission.

These notations carry extra physical meaning that often hints at rotation, magnetic fields, winds, or circumstellar material. When combined with high-fidelity spectra, the MK system still stands as the practical backbone of stellar classification, even as quantitative, model-based methods (e.g., fitting atmospheric models) complement it in modern surveys.

Hertzsprung–Russell Diagram: From Spectral Type to Evolution

The Hertzsprung–Russell (HR) diagram is the map on which spectral types, luminosities, and stellar evolution all come together. Plotting stars by absolute magnitude (or luminosity) versus color (or effective temperature) reveals well-known structures:

  • Main sequence: A diagonal band where stars spend most of their lives, burning hydrogen in their cores. Type O and B stars are hot and luminous (upper left); K and M dwarfs are cool and faint (lower right).
  • Subgiant and giant branches: As stars exhaust core hydrogen, they move off the main sequence, increasing in radius and luminosity.
  • Supergiants: Massive stars evolve to extremely luminous positions above the giant branches.
  • White dwarfs: Compact remnants occupy the lower left—hot but faint because of their tiny radii.

Spectral type primarily sets the horizontal position (temperature), while luminosity class affects the vertical placement (luminosity). For example, both G2V and G2III share temperature but differ markedly in luminosity. This two-parameter classification allows quick placement on the HR diagram, which in turn indicates evolutionary state.

A conceptual HR diagram: temperature decreases left-to-right, luminosity increases upward. The main sequence runs diagonally; giants sit above, white dwarfs below.

Modern datasets, such as those from Gaia, provide precise parallaxes and photometry that allow the construction of exceptionally clean color–magnitude diagrams for huge samples. This has refined our understanding of features like the main-sequence turnoff, the subgiant branch, and the white dwarf cooling sequence. The combination of colors and luminosities with precise distances lets astronomers calibrate stellar models and trace the star-formation history of the Galaxy.

Gaia’s Hertzsprung-Russell diagram ESA393151
More than four million stars within five thousand light-years from the Sun are plotted on this Hertzsprung–Russell diagram using Gaia DR2 data. It is a fundamental tool to study stellar populations and their evolution.
Attribution: European Space Agency

Key takeaways that link classification to evolution:

  • Hot, massive O and B stars evolve quickly; their scarcity in color–magnitude diagrams reflects both rarity and short lifespans.
  • G and K dwarfs are long-lived; M dwarfs are extraordinarily long-lived and dominate by number.
  • Giants and supergiants represent later evolutionary stages; their spectral types shift as their outer layers expand and cool.
  • White dwarfs are endpoints for low- and intermediate-mass stars and use a distinct classification outside OBAFGKM (see Beyond OBAFGKM).

Color Indices, Photometry, and Effective Temperature

While spectroscopy classifies stars via lines, photometry infers properties from broadband colors. The classic index B−V (blue minus visual magnitude) is a temperature proxy: lower (bluer) values indicate hotter stars, higher (redder) values indicate cooler stars. Other systems, such as Gaia’s BP−RP, Sloan Digital Sky Survey (SDSS) filters, and near-infrared (JHK), provide complementary color indices.

Here is the general chain of inference used in stellar astrophysics:

  1. Measure apparent magnitudes in well-defined passbands (e.g., B and V).
  2. Compute colors (e.g., B−V, BP−RP).
  3. Correct colors for interstellar reddening when needed to recover intrinsic color.
  4. Convert color to effective temperature (Teff) via empirical or theoretical calibrations.
  5. Use parallax to derive absolute magnitude; place the star on the HR diagram.
Updated Hertzsprung-Russell Diagram
An updated Hertzsprung–Russell Diagram, based on an ESO graphic, under Creative Commons Attribution 4.0.
Attribution: Daniel William "Danny" Wilson

Empirical relations tie color to Teff. One commonly cited approximation for main-sequence stars is the following formula relating B−V to temperature. While simplified and not universal, it gives reasonable first-order estimates for typical dwarfs:

# Approximate effective temperature (Teff) from B-V color for main-sequence stars
# Ballesteros-style formula (approximate):
# Teff ≈ 4600 K * (1 / (0.92*(B_V) + 1.7) + 1 / (0.92*(B_V) + 0.62))

def teff_from_bv(B_V):
    return 4600.0 * (1.0 / (0.92*B_V + 1.7) + 1.0 / (0.92*B_V + 0.62))

# Example: the Sun has B-V ≈ 0.65
print(teff_from_bv(0.65))  # ~ 5770 K (roughly Sun-like)

Remember, the accuracy of such relations depends on metallicity, luminosity class, and reddening. For precise work, astronomers use calibrated relations tailored to specific filter systems and stellar populations, or perform spectroscopic determinations of Teff by fitting model atmospheres to observed spectra.

Photometric systems you will encounter:

  • Johnson–Cousins UBVRI: The classic optical system long used for color–temperature calibrations.
  • SDSS ugriz: Five filters spanning near-UV to near-IR; widely used for large surveys.
  • Gaia G, BP, RP: High-precision broad bands used to build all-sky color–magnitude diagrams.
  • 2MASS JHKs: Near-IR bands that are less affected by dust and useful for cool stars.

When spectroscopy is unavailable, combining color indices with extinction corrections and distance information allows robust placement on the HR diagram. Conversely, if precise spectra are in hand, photometry serves as an independent check and helps in understanding dust, variability, or binarity.

Interstellar Reddening, Extinction, and Correcting Colors

Interstellar dust dims and reddens starlight. This effect, called extinction (dimming) and reddening (color change), must be corrected to avoid misclassifying stars as cooler than they are. The basic quantities are:

  • E(B−V) — The color excess, or how much redder the star appears compared to its intrinsic color.
  • AV — Extinction in the V band, often related to E(B−V) by AV = RV × E(B−V), with RV ≈ 3.1 typical for the diffuse interstellar medium (but it can vary by sightline).

To correct an observed color, subtract the reddening:

# Intrinsic color (B-V)_0 from observed color (B-V) and color excess E(B-V)
(B_V)_0 = (B_V) - E_BV

Then use (B−V)0 in color–temperature relations. Similarly, correct magnitudes using the appropriate Aband extinction coefficients to derive intrinsic luminosities for the HR diagram.

Practical notes:

  • Maps and 3D dust models: Large-scale reddening maps and 3D dust reconstructions provide E(B−V) estimates for various sky directions and distances.
  • Filter dependence: Extinction curves vary with wavelength; use band-specific coefficients for accurate dereddening.
  • Spectroscopic checks: Line ratios and spectral energy distributions can help disentangle reddening from intrinsic stellar color, especially in hot stars where UV extinction is significant.

Applying reddening corrections is essential whenever stars lie behind significant dust columns—common in the Galactic plane and star-forming regions.

Metallicity, Population Types, and Galactic Archaeology

Beyond temperature and gravity, a star’s metallicity—its abundance of elements heavier than helium—shapes line strengths and colors. Metallicity is often expressed as [Fe/H], the logarithmic ratio of iron abundance relative to the Sun. Metal-poor stars ([Fe/H] < 0) typically have weaker metal lines at the same temperature compared to solar-metallicity stars, affecting both spectral classification nuances and photometric calibrations.

Metallicity ties into the concept of stellar populations:

  • Population I: Metal-rich, younger stars concentrated in the Galactic disk (e.g., many F, G, K dwarfs in the solar neighborhood).
  • Population II: Metal-poor, older stars found in the halo and thick disk (e.g., subdwarfs, globular cluster stars).
  • Population III: Hypothetical first-generation, metal-free stars—none confirmed to be directly observed; searches focus on extremely metal-poor stars that carry signatures of early nucleosynthesis.

While MK spectral type emphasizes temperature and gravity, metallicity subtly influences line ratios used in classification. For example, very metal-poor G dwarfs (often tagged “sd” for subdwarf) may shift in apparent subtype if one naively compares metal-line strengths to solar-metallicity standards. Modern surveys account for this by measuring [Fe/H] spectroscopically and by using metallicity-aware photometric calibrations.

In galactic archaeology, combining spectral types with metallicities, kinematics, and ages allows astronomers to reconstruct the Milky Way’s formation history. Large spectroscopic surveys—paired with Gaia parallaxes and proper motions—map stellar populations across the Galaxy, revealing streams, accretion remnants, and gradients in chemical composition. Accurate classification remains fundamental to this enterprise: it anchors the temperature and gravity scales upon which metallicity and age inferences are built.

Beyond OBAFGKM: White Dwarfs, Carbon Stars, and Peculiar Types

The OBAFGKM sequence covers most normal stars, but astronomers have developed additional and extended schemes for special classes:

The radial velocities of the Balmer lines in WD 0931+444 (geminiann14006c)
The radial velocities of the Balmer lines in white dwarf WD 0931+444. The dotted line represents the best-fit model for a circular orbit with a period of 19.8 minutes.
Attribution: International Gemini Observatory/NOIRLab/NSF/AURA

  • White dwarfs: Classified with a D prefix and suffixes indicating dominant atmospheric species and temperature sequence (e.g., DA for hydrogen-dominated, DB helium-dominated, DC featureless continuum, DO hot helium ionization lines, DQ carbon features, DZ metal lines). A secondary temperature index follows.
  • Carbon stars: Evolved giants with C-rich atmospheres. Modern notation uses types like C-N, C-R, and other subclasses based on spectra. These display strong CN and C2 molecular bands and very red colors.
  • S-type stars: Giants with spectral features reflecting s-process element enhancements; ZrO bands can be prominent.
  • L, T, Y dwarfs: For substellar objects and very cool brown dwarfs beyond M types, infrared-dominated classifications are used. These are not stars in the fusion sense but are vital to the cool-object taxonomy.
  • Peculiar and emission-line stars: Suffixes such as “e” (emission) and “p” (peculiar) augment OBAFGKM types (e.g., B2Ve, an emission-line B star). Magnetic chemically peculiar A and B stars (Ap/Bp) exhibit line anomalies due to element stratification in strong fields.

Even among “normal” stars, subclass boundaries can blur. For instance, A–F stars exhibit a rich variety of line behaviors tied to rotation, diffusion, and convection. The MK framework remains adaptable: it provides a morphological baseline to describe whatever the spectrum shows, while specialized schemes cover distinct physical regimes like white dwarfs and brown dwarfs.

How Astronomers Classify Stars with Spectrographs and Data Pipelines

Modern stellar classification blends traditional, expert-guided comparison with automated analysis over vast datasets. The overall workflow looks like this:

  1. Data acquisition: Telescopes feed light into spectrographs, dispersing it to record intensity versus wavelength. Spectra may be low-resolution (broad features), medium (line blends), or high-resolution (fine line details, precise velocities).
  2. Calibration and reduction: Raw frames are bias/dark subtracted, flat-fielded, wavelength-calibrated with arc lamps or sky lines, and corrected for instrumental response. Telluric (Earth’s atmosphere) corrections may be applied.
  3. Continuum normalization: For classification, spectra are often normalized to better compare line depths and shapes independent of overall slope.
  4. Template matching or standard comparison: The MK approach compares against standard-star libraries. Automated pipelines cross-correlate or fit templates to derive the best spectral type and luminosity class.
  5. Model fitting: Synthetic spectra from stellar atmosphere models are fitted to observed spectra to estimate Teff, log g (surface gravity), and [Fe/H] (metallicity). These parameters can then be translated into MK-like labels.
  6. Quality checks and flags: Peculiarities (emission, rotation, binaries) are flagged; outliers might be re-examined manually.

Massive spectroscopic surveys have transformed the field. Programs such as the Sloan Digital Sky Survey (SDSS), LAMOST, APOGEE (infrared), RAVE, and GALAH have amassed millions of spectra. Meanwhile, Gaia’s all-sky astrometry and photometry provide distances and colors to put classified stars on the HR diagram and into a Galactic context.

Hertzsprung-Russell Diagram 2026
A Hertzsprung–Russell Diagram showing temperatures, luminosities, radii, and evolutionary stages of numerous real-life stars, based on up-to-date information.
Attribution: Danny William Wilson

Machine learning methods are increasingly common. Neural networks and tree-based models trained on spectra and photometry can rapidly estimate Teff, log g, and [Fe/H], and suggest spectral types. Even so, the MK standards remain the touchstone for morphological labels, ensuring human-understandable categories alongside quantitative parameters.

Instrumentation details that affect classification:

  • Resolution (R): Low R (a few thousand) suffices for broad classification; high R (≥20,000) resolves individual lines for precise abundances and gravity indicators.
  • Signal-to-noise (S/N): Higher S/N yields more reliable line-depth comparisons and reduces misclassification.
  • Wavelength coverage: Blue coverage captures Balmer lines and Ca II H & K; red/IR coverage captures TiO bands and metallic features important for cool stars.

For specialized stars—white dwarfs, carbon stars, or emission-line objects—pipelines route spectra to dedicated classifiers. The result is a coherent taxonomy capable of handling the Galaxy’s diverse stellar zoo.

Citizen Science: Estimating Stellar Colors and Variability

While professional spectroscopy drives formal classification, amateur astronomers and citizen scientists can contribute meaningfully via photometry and variability monitoring. Two accessible pathways stand out:

  • Broadband photometry: With a modest CCD/CMOS camera and standard filters (e.g., Johnson–Cousins or Sloan), observers can measure stellar magnitudes and derive color indices like B−V. Corrected for reddening, these colors help estimate effective temperatures and approximate spectral types.
  • Variable star monitoring: Many variables (e.g., Cepheids, RR Lyrae, eclipsing binaries) show characteristic color and brightness changes. Tracking them refines period–luminosity relations and informs stellar evolution. Organizations support standardized submissions and data quality checks.

Good practices for reliable results:

  • Calibrate carefully: Use comparison and check stars with known magnitudes; apply bias/dark/flat corrections; characterize your instrumental response.
  • Use consistent apertures: Aperture photometry demands consistent radii and sky annuli to minimize systematic errors, especially in crowded fields.
  • Transform to standard systems: If using unfiltered or non-standard filters, apply transformation coefficients to tie your measurements to standard photometric systems.
  • Document uncertainties: Report measurement errors; repeat observations improve precision and reveal variability.

For enthusiasts interested in spectral features, low-resolution spectroscopes mounted on small telescopes can capture Balmer lines in A stars, the Ca II H & K lines in F–G stars, or TiO bands in M stars. Although these set-ups cannot replace professional classification, they reinforce the connection between spectral lines and temperature and offer a hands-on appreciation of the MK scheme.

Citizen contributions complement professional efforts by expanding time coverage and sampling. High-cadence, long-baseline observations are especially valuable for transient or periodic phenomena and can help identify stars for follow-up spectroscopy and detailed classification.

Frequently Asked Questions

Is spectral type the same as color?

They are closely related but not identical. Spectral type is derived from line diagnostics that respond to temperature and pressure, whereas color is a broadband measure affected by both temperature and interstellar reddening. After correcting for dust, color correlates well with temperature and thus with spectral type, especially for main-sequence stars. However, two stars with the same color can differ in luminosity class and metallicity, which is why spectral classification relies on detailed line comparisons in addition to color.

Can metallicity or rotation change a star’s spectral type?

Metallicity and rotation can influence line strengths and profiles, which can affect detailed subtype assignments. Metal-poor stars (subdwarfs) often have weaker metal lines and may be assigned different morphological labels compared to solar-metallicity standards. Rapid rotation broadens lines (denoted by “n”), potentially complicating subtype determinations. Nevertheless, the primary driver of spectral type remains effective temperature, with luminosity class set primarily by gravity-sensitive features.

Final Thoughts on Understanding Stellar Spectral Types

Stellar spectral classification—anchored by the OBAFGKM sequence and expanded by luminosity classes—remains one of astronomy’s most powerful organizing tools. It translates complex physics into a compact label that encodes temperature, gravity, and often hints of composition and activity. On the HR diagram, these labels sketch the flow of stellar evolution from hot, massive O stars down to long-lived M dwarfs and onward to white dwarfs and other advanced stages described in specialized classification schemes.

For practitioners, accurate classification ensures that temperature scales, metallicities, and ages are on a consistent footing—crucial for galactic archaeology and stellar population studies. For enthusiasts and students, it provides a mental map: hydrogen lines peak in A stars, helium signals the hottest classes, metal lines and molecular bands crescendo toward cooler types. Photometry, with careful reddening corrections, complements spectroscopy to locate stars on the HR diagram and to follow their evolutionary paths.

Whether you’re parsing survey catalogs or simply curious about the letters attached to your favorite bright stars, understanding spectral types connects visual impressions to the physics of stellar atmospheres. If you enjoyed this deep dive, explore related topics on stellar evolution, metallicity, and variable stars—and subscribe to our newsletter to get future articles that build on this foundation.

Hertzsprung-Russell Diagram - ESO
In the Hertzsprung–Russell diagram the temperatures of stars are plotted against their luminosities. The position of a star in the diagram provides information about its present stage and its mass.
Attribution: ESO
Stay In Touch

Be the first to know about new articles and receive our FREE e-book