How this calculation works
A Lomb–Scargle periodogram compares sinusoidal fits across trial frequencies even when observation times are unevenly spaced. It avoids inventing regularly spaced measurements by interpolation. At each frequency, this calculator fits an offset, a cosine coefficient and a sine coefficient using the entered positive observation weights.
At each f,fit c+a cos(2πft)+b sin(2πft);power=1−weightedSSE/constantSSE.A worked example
The uneven default samples are generated from2+3cos(2π·0.8t). The frequency grid contains0.8,which returns period1.25 and normalized power1.
Good to know
Rows time,value,positive weight;4–200 samples,3–300 positive grid frequencies;weighted floating-mean fits. Frequencies are cycles/time,not radians/time;no false-alarm significance claim.
Reference: Floating-mean Lomb–Scargle periodogram reference (opens in a new tab) ↗
Inspect periodic structure without regular sampling
A Lomb–Scargle periodogram compares sinusoidal fits across trial frequencies even when observation times are unevenly spaced. It avoids inventing regularly spaced measurements by interpolation. At each frequency, this calculator fits an offset, a cosine coefficient and a sine coefficient using the entered positive observation weights.
The output reports normalized improvement over a weighted constant model, a frequency grid and the strongest grid point. It does not estimate a false-alarm probability or automatically prove that a periodic physical process exists. Sampling patterns, trends and noise can all produce peaks that need interpretation beyond a least-squares fit.
Compare this with the Nonuniform Fourier transform calculator from irregular sample times. Estimate weighted floating-mean sinusoidal power versus frequency and identify candidate periods; a raw nonuniform Fourier sum has a different normalization/model.
Enter times, values and weights together
Each row contains a time, observed value and positive weight. At least four distinct observation times and four to two hundred total rows are required. The weight is used directly in the least-squares objective; if weights represent measurement precision, an inverse-variance convention is a common deliberate choice.
The time unit determines the frequency unit. Times measured in days produce frequencies in cycles per day and periods in days. The calculator does not interpret dates, infer uncertainties or deduplicate repeated observations automatically. Keep repeated measurements only when their weighting and independence are appropriate for the question.
Keep frequency distinct from angular frequency
The interface asks for ordinary frequency in cycles per unit time. The trigonometric design internally uses angular frequency equal to two pi times that value. Some scientific libraries instead accept angular frequency directly, so comparing input numbers without checking conventions can shift a peak by a factor of two pi.
The lower frequency must be positive and smaller than the upper frequency. Between three and three hundred equally spaced trial frequencies are supported. The frequency grid is explicit rather than selected from a claimed universal Nyquist rule, because irregular sampling does not supply one simple average-spacing cutoff that resolves every aliasing question.
Understand the floating mean and normalization
Every trial fit includes its own offset instead of subtracting one global mean and forcing a zero-offset sinusoid. This floating mean can matter with uneven sampling or phase-dependent coverage. The fitted amplitude is the square root of the sum of squared sine and cosine coefficients at that frequency.
Normalized power is one minus the fitted weighted residual sum of squares divided by the constant-model weighted residual. A value near one means the trial sinusoid explains nearly all the weighted variation relative to that constant baseline. It is not a probability that the frequency is real or a posterior probability of a periodic model.
Recover the known prefilled oscillation
The twenty frozen samples follow a sinusoid of frequency 0.8 cycles per time unit, amplitude three and offset two. Their irregular times demonstrate that equally spaced sampling is not required for the regression construction. The trial grid from 0.2 through 1.4 includes the generating frequency exactly.
The strongest default grid point is therefore 0.8, corresponding to a period of 1.25 time units, with normalized power effectively one. Adding noise or removing observations can lower that peak or create competing peaks. A grid that misses 0.8 would generally return its best available neighboring frequency rather than the exact generating value.
Grid peaks are approximate candidates
The peak is selected only among the entered grid points. A finer search can improve numerical localization but cannot by itself resolve aliases caused by the observing schedule. Long periods relative to the observation span and narrow frequency separations require special caution even when a dense grid is inexpensive to calculate.
The design matrix can become singular or poorly conditioned at particular frequencies, for example when trigonometric columns are nearly indistinguishable over the observed times. Such a failure is reported rather than assigned an artificial power. Reconsider the frequency range, time scaling and observation geometry before treating it as missing evidence of periodicity.
Keep inference separate from curve fitting
The calculator fits one sinusoid plus an offset at a time. It does not detrend the data, fit multiple harmonics, model colored noise or adjust a significance threshold for searching many frequencies. These choices can change the interpretation of the strongest apparent peak substantially.
Preserve the time unit, weights, trial range and grid size with a reported period. A high peak is a useful candidate for further analysis, not a substitute for measurement checks or an appropriate stochastic model. Independent replication or a dedicated significance analysis is needed when the conclusion depends on detecting a genuine recurring process.
A few questions, answered
Can sampling times be uneven?
Yes. The sinusoidal regression is evaluated at the actual entered times.
Are frequencies angular frequencies?
No. Enter cycles per time unit;the implementation multiplies by2π internally.
Does power one establish a real periodic cause?
No. It describes fit on the supplied samples and grid,not significance,causality or an absence of aliases.
What does floating mean mean?
A constant offset is estimated separately at every trial frequency rather than fixed at zero.