Allan Deviation Stability Calculator

How steady is a clock, from one second to hours?

  • Overlapping estimator
  • Noise slope
  • 90 percent interval
A small rounded clay table holding a train of soft clay cogs beside a second train with one wobbling cog, and a few loose rounded beads.

The guide

The Allan deviation tells you how steady a clock is where the plain standard deviation never settles

Half the mean squared difference between successive average frequencies gives one number per averaging time, and its slope on a log-log plot names the noise that limits the clock.

  • 9.9626e-12 overlapping Allan deviation of the seeded example at 1 s
  • -0.522 fitted slope of that example, where white frequency noise gives -0.5
  • 665.8 degrees of freedom at 1 s for white frequency noise, N = 1001
  • 1.2019e-13 non-overlapping value at 256 s from only 3 blocks
  • 7.0711e-12 a steady drift of 1e-12 per second, at 10 s
Read the full guide Fold the guide 6 min · 20 sources

Take 1,000 frequency readings from a clock with nothing but white frequency noise in it, one per second. Their plain standard deviation is 9.8758e-12. The Allan deviation at one second is 9.9626e-12. The two agree, and it is tempting to conclude that the plain standard deviation will do.

Now let the frequency wander instead, as a running total of the same random steps. The plain standard deviation of the first 100 readings is 2.9505e-11. Over all 1,000 readings it is 8.2971e-11, nearly three times larger, and it would keep climbing as the record grew. The Allan deviation of that series at one second is 6.9868e-12, and it stays there however long you watch.

What the Allan deviation measures

The Allan variance, also called the two-sample variance, is a measure of frequency stability in clocks, oscillators and amplifiers. It is named after David W. Allan, an American physicist who worked on atomic clocks at the National Bureau of Standards, and the Allan deviation is its square root. It is defined as half the time average of the squared differences between successive readings of the fractional frequency, each averaged over a sampling period tau.

Because the result depends on tau, it is drawn as a graph, not quoted as one number. A value of 1.3e-9 at tau = 1 s means two observations one second apart differ in frequency by a relative root-mean-square amount of 1.3e-9. For a 10 MHz clock that is 13 mHz. A low value at a given tau marks a clock that is steady over that span.

The plain standard deviation cannot do this job. It assumes the readings scatter around a fixed mean. Flicker and random-walk frequency noise have no fixed mean to scatter around, so the standard deviation of a longer record is a different number. The Allan variance compares neighbours instead, which stays finite for such noise, and it is described as a set of improved tools whenever the noise processes are not unconditionally stable.

The clocks that need this are the best ones. Caesium atomic clocks are a primary standard for the definition of the second, optical lattice clocks use strontium or ytterbium atoms held by laser light, and a crystal oscillator keeps time in a quartz wristwatch. Shared standards such as International Atomic Time are built by transferring time and frequency between sites.

Two ways to the same number

The estimator for one tau is simple. Average the frequency over each block of n readings, subtract neighbouring block means, square, add up, and divide by twice the count. For time-error data the same sum is written on the phase x: the second difference x(i+2n) - 2 x(i+n) + x(i), squared and summed, divided by 2 (n tau0)^2 times (N - 2n). A frequency record becomes phase by a running sum times tau0, which is why both kinds of data share one formula, with N = M + 1.

Leaving out the factor 2 makes every value the square root of 2 too large. For the seeded example it turns 9.9626e-12 into 1.4089e-11. A clean way to test the factor is a steady drift with no noise at all. A frequency that rises by 1e-12 every second gives exactly D tau over the square root of 2, which is 7.0711e-12 at 10 seconds and 7.0711e-11 at 100.

There are two estimators for tau other than tau0. The non-overlapped one uses only 1 / n of the data: blocks that do not share a reading. The overlapped one, introduced by Howe, Allan and Barnes, slides the start point by one reading at a time and reuses the data. It is the preferred estimator in IEEE, ITU-T and ETSI standards, and its advantage grows with n.

The example shows it. At 10 seconds the overlapping value is 3.3006e-12 from 981 second differences and the non-overlapping one is 3.2415e-12 from 99 block pairs. At 100 seconds they are 8.1567e-13 and 7.2288e-13. At 256 seconds only three whole blocks remain, and the non-overlapping value of 1.2019e-13 sits far from the overlapping 3.8997e-13.

One detail the source leaves open is what to do with readings left over after the last whole block. This tool drops them and says so. With n = 7 the 1,000 readings make 142 blocks and the last 6 readings are dropped.

Slopes name the noise

On a log-log plot the Allan deviation of a power-law noise falls on a straight line. White or flicker phase noise gives a slope of -1, white frequency noise -1/2, flicker frequency noise 0, random-walk frequency noise +1/2, and a steady frequency drift +1. White noise has a flat power spectral density, flicker noise falls as 1 / f, and Brownian noise, also called red noise or random-walk noise, falls as 1 / f squared.

A real oscillator usually passes through several of these. The deviation drops while the noise averages out, bottoms at a floor, and climbs again once drift takes over; the source gives temperature changes and component aging as causes of frequency drift. The seeded white-frequency example fits a slope of -0.522 over n = 1 to 128, where -0.5 is expected, a difference that 1,000 readings can produce by chance.

Two cautions come with the slope. A slope near -1 cannot separate white from flicker phase noise, and the source says plainly that failing to identify the dominant noise type gives biased values, sometimes by several orders of magnitude. The tool reports the regime nearest to the fitted slope and lets you override it for the interval.

How wide the interval is

The 90 percent interval comes from the chi-squared distribution. With s squared the estimate and df its equivalent degrees of freedom, the true variance lies between df s^2 over the 95th percentile and df s^2 over the 5th percentile, both of a chi-squared with df degrees of freedom. The degrees of freedom depend on N, on n and on the noise type, through an empirical table.

For the example, with N = 1,001 phase samples and white frequency noise, df is 665.8 at 1 second and the interval is 9.534e-12 to 1.043e-11. At 10 seconds df is 146.2 and the interval is 3.013e-12 to 3.655e-12. At 100 seconds df is 13.0 and the interval widens to 6.219e-13 to 1.212e-12. The source recommends plotting the interval with the data and limiting how large n may grow compared with N, which is why the tool fits only up to the largest power of two at most M / 7.

A simulation run for this page checked the table. For each noise type it generated many records, computed the overlapping variance and estimated df as twice the squared mean over the variance of the estimates. White phase, white frequency, random-walk frequency and flicker frequency from n = 2 agree to within about 8 percent at N = 129 and 1,001. Two printed rows do not. The flicker phase row, with an exponent of -1/2, gives about 1.2 at N = 1,001 where simulation gives about 620, and the flicker frequency row at n = 1 gives 0.87 where simulation gives about 820.

The tool uses an exponent of +1/2 for flicker phase, which lands within about 20 percent of the simulation, and shows no interval for flicker frequency at n = 1. The NIST handbook adds that correlated data have fewer degrees of freedom than uncorrelated data, which fits the pattern.

What it cannot do

The Allan deviation estimates stability from noise. It is not meant for systematic errors such as drift or temperature effects: a constant phase and frequency offset cancels in the differences, but a linear drift does not, and it appears as the +1 slope. It says nothing about accuracy, meaning how close the clock is to the true time or frequency.

The tool leaves out the modified Allan variance, time deviation, the Hadamard variance, total variance, dead-time bias functions and phase-noise spectra. Phase noise is the frequency-domain view of the same fluctuations, a different language for a related question. The tool also assumes readings taken without dead time.

To reproduce the numbers, open the page with its seeded example, generated by a small 32-bit routine that relies on Math.imul. The slopes were checked against numpy.polyfit, the second differences against numpy.diff, and the chi-squared quantiles against scipy.stats.chi2.

Sources

Every source consulted for this guide. Links checked November 22, 2026.

  1. Allan variance Wikipedia
  2. David W. Allan Wikipedia
  3. Atomic clock Wikipedia
  4. Caesium standard Wikipedia
  5. Optical lattice clock Wikipedia
  6. Crystal oscillator Wikipedia
  7. Frequency drift Wikipedia
  8. Phase noise Wikipedia
  9. White noise Wikipedia
  10. Flicker noise Wikipedia
  11. Brownian noise Wikipedia
  12. Spectral density Wikipedia
  13. Standard deviation Wikipedia
  14. Time and frequency transfer Wikipedia
  15. Time and Frequency Division National Institute of Standards and Technology
  16. Handbook of Frequency Stability Analysis National Institute of Standards and Technology
  17. scipy.stats.chi2 SciPy documentation
  18. numpy.diff NumPy documentation
  19. numpy.polyfit NumPy documentation
  20. Math.imul() MDN Web Docs