Equivalent Width Calculator
Upload a spectrum of a star, brown dwarf, or exoplanet, define the line and continuum windows, and measure its equivalent width.
1. Load a spectrum
Two numeric columns: wavelength and flux. Extra columns are ignored. Whitespace- or comma-separated files are supported; comment lines starting with # are ignored. Wavelengths must be in the selected unit.
Your spectrum is processed locally in your browser and is not uploaded to any server.
2. Inspect Spectrum & Define Regions
Inspect the spectrum, drag a rectangle to zoom into both wavelength and flux ranges, and enter the wavelength ranges you want to test. Click Show Regions to display your choices on the plot. No equivalent width is calculated in this section.
3. Calculate Equivalent Width
Before calculating: Please check that the wavelength regions you selected and displayed in Section 2 are the ones you intended to use.
4. How Is Equivalent Width Calculated?
What does equivalent width measure? A spectrum shows how the amount of light varies with wavelength. Spectral lines appear as dips below or peaks above the surrounding spectrum. The equivalent width (EW) measures the total strength of a spectral feature relative to its local continuum, the underlying level of light against which the feature is measured. EW depends on both the depth or height and the width of a feature, not just its most extreme point.
As illustrated in the figure, the shaded region represents the amount of light "missing" from the spectrum relative to the surrounding continuum. Equivalent width quantifies this difference by integrating the spectral line relative to the continuum across the selected wavelength range. The same principle applies to emission lines, where the observed flux exceeds the continuum.
How is it calculated? The calculator uses the following definition:
Here, \(F_\lambda\) is the observed spectral flux, \(F_c(\lambda)\) is the estimated continuum flux at that wavelength, and \(\lambda_1\) and \(\lambda_2\) mark the start and end of the selected line region. The integral adds up the difference between the observed spectrum and the continuum across the entire region.
Schematic absorption line showing example blue and red continuum windows and the line region. The orange shading illustrates the missing flux relative to the fitted continuum.
How does this calculator estimate the continuum? You select three wavelength regions: a blue continuum window just shortward of the feature, a line window containing the feature, and a red continuum window just longward of it. The calculator fits a straight line to the flux samples in the two continuum windows using linear least squares, then integrates the continuum-normalized spectrum across the line window using the trapezoidal rule.
Tips for reliable measurements. Choose continuum windows near the line that avoid strong neighboring features whenever possible. Include the full feature within the line window, but avoid unrelated lines. Some spectra contain many overlapping features, making the true continuum difficult to identify; in these cases, the fitted level is often called a local pseudo-continuum. Try adjusting the windows slightly to see how much your EW changes. This helps you judge how sensitive the measurement is to your choices.
EW is reported in the selected wavelength unit (Å or µm).