Aliasing Frequency Calculator Formula

Understand the math behind the aliasing frequency calculator. Each variable explained with a worked example.

Formulas Used

Aliased Frequency

alias_freq = folded_raw > nyquist ? sample_rate_hz - folded_raw : folded_raw

Nyquist Frequency

nyquist_freq = nyquist

Is Signal Aliased?

is_aliased = signal_freq_hz > nyquist ? 1 : 0

Variables

VariableDescriptionDefault
signal_freq_hzSignal Frequency(Hz)30000
sample_rate_hzSampling Rate(Hz)44100
nyquistDerived value= sample_rate_hz / 2calculated
folded_rawDerived value= abs(signal_freq_hz - floor(signal_freq_hz / sample_rate_hz + 0.5) * sample_rate_hz)calculated

How It Works

How Aliasing Works

When a signal exceeds the Nyquist frequency (half the sampling rate), it "folds" back into the representable range, appearing as a lower frequency.

Formula

The aliased frequency is found by folding the signal into the first Nyquist zone:

f_alias = |f_signal - round(f_signal / f_sample) x f_sample|

If this result is above Nyquist, subtract from the sampling rate.

Example

A 30 kHz tone sampled at 44.1 kHz aliases to 14.1 kHz (44.1 - 30 = 14.1 kHz).

Worked Example

A 30 kHz signal sampled at 44.1 kHz.

signal_freq_hz = 30000sample_rate_hz = 44100
  1. 01Nyquist: 44,100 / 2 = 22,050 Hz
  2. 0230,000 > 22,050, so aliasing occurs
  3. 03Alias: |30,000 - 1 x 44,100| = 14,100 Hz
  4. 04The 30 kHz signal appears as 14,100 Hz

Ready to run the numbers?

Open Aliasing Frequency Calculator