Langley extrapolation is a method for determining the Sun's irradiance at the top of the atmosphere with ground-based instrumentation, and is often used to remove the effect of the atmosphere from measurements of, for example, aerosol optical thickness or ozone. It is based on repeated measurements with a Sun photometer operated at a given location for a cloudless morning or afternoon as the Sun moves across the sky. It is named for American astronomer and physicist Samuel Pierpont Langley.
 It is known from Beer's law that, for every instantaneous measurement, the direct-Sun irradiance I is linked to the solar extraterrestrial irradiance I0 and the atmospheric optical depth 
  
    
      
        τ
      
    
    {\displaystyle \tau }
  
 by the following equation:
         (1) where m is a geometrical factor accounting for the slant path through the atmosphere, known as the airmass factor.
For a plane-parallel atmosphere, the airmass factor is simple to determine if one knows the solar zenith angle θ: m = 1/cos(θ).  As time passes, the Sun moves across the sky, and therefore θ and m vary according to known astronomical laws.
 By taking the logarithm of the above equation, one obtains:
         (2) and if one assumes that the atmospheric disturbance 
  
    
      
        τ
      
    
    {\displaystyle \tau }
  
 does not change during the observations (which last for a morning or an afternoon), the plot of ln I versus m is a straight line with a slope equal to 
  
    
      
        τ
      
    
    {\displaystyle \tau }
  
.  Then, by linear extrapolation to m = 0, one obtains I0, i.e. the Sun's radiance that would be observed by an instrument placed above the atmosphere.
 The requirement for good Langley plots is a constant atmosphere (constant 
  
    
      
        τ
      
    
    {\displaystyle \tau }
  
).  This requirement can be fulfilled only under particular conditions, since the atmosphere is continuously changing.  Needed conditions are in particular: the absence of clouds along the optical path, and the absence of variations in the atmospheric aerosol layer.  Since aerosols tend to be more concentrated at low altitude, Langley extrapolation is often performed at high mountain sites.  Data from NASA Glenn Research Center indicates that the Langley plot accuracy is improved if the data is taken above the tropopause.
 A Langley plot can also be used as a method to calculate the performance of solar cells outside the Earth's atmosphere.  At the Glenn Research Center, the performance of solar cells is measured as a function of altitude.  By extrapolation, researchers determine their performance under space conditions.
 Sun  photometers using low cost light-emitting diode  (LED)  detectors  in  place of optical  interference filters  and  photodiodes have a relatively wide  spectral response. They might be used by a globally distributed network of students and teachers to monitor atmospheric haze and aerosols, and can be calibrated using Langley  extrapolation. In 2001, David Brooks and Forrest Mims were among many to propose detailed procedures to modify the Langley plot in order to account for Rayleigh scattering, and atmospheric refraction by a spherical earth.
 Di Justo and Gertz compiled a handbook for using Arduino to develop these photometers in 2012. The handbook refers to 
  
    
      
        τ
      
    
    {\displaystyle \tau }
  
 in equations (1) and (2), as the AOT (Atmospheric Optical Thickness), and the handbook refers to I0 as the EC (extraterrestrial constant). The manual suggests that once a photometer is constructed, the user waits for a clear day with few clouds, no haze and constant humidity.  After the data is fit to equation (1) to find I0, the handbook suggests a daily measurement of I.  Both I0 and I are obtained from the LED current (voltage across sensing resistor) by subtracting the dark current:
         (3) where 
  
    
      
        
          V
          
            s
          
        
      
    
    {\displaystyle V_{s}}
  
 is the voltage while the LED is pointing at the Sun, and 
  
    
      
        
          V
          
            d
          
        
      
    
    {\displaystyle V_{d}}
  
 is the voltage while the LED is kept dark.  There is a misprint in the manual regarding the calculation of 
  
    
      
        τ
      
    
    {\displaystyle \tau }
  
 from this single data point. The correct equation is:
         (4) where 
  
    
      
        
          I
          
            0
          
        
      
    
    {\displaystyle I_{0}}
  
 was calculated on that clear and stable day using Langley extrapolation.