Sampling Theorem Calculator

Estimate Nyquist limits, safe sampling rates, and aliasing effects. Compare bandwidth, period, and margins easily. Visualize waveform capture with clear graphs for better decisions.

Calculator Inputs

deg

Example Data Table

Case Maximum Signal Frequency Sampling Frequency Nyquist Rate Alias Outcome Interpretation
Audio channel 20 kHz 48 kHz 40 kHz Negligible for in-band content Comfortable oversampling
Boundary case 5 kHz 10 kHz 10 kHz Critical edge Exactly at Nyquist
Undersampled tone 4 kHz 6 kHz 8 kHz Aliasing likely Unsafe for clean reconstruction
Instrumentation 250 Hz 2 kHz 500 Hz Very low Robust acquisition margin

Formula Used

Baseband sampling theorem: for a band-limited signal with highest frequency component fmax, accurate reconstruction requires fs ≥ 2fmax.

Nyquist rate: fN = 2fmax

Nyquist interval: TN = 1 / (2fmax)

Actual sampling period: Ts = 1 / fs

Oversampling ratio: OSR = fs / (2fmax)

Sampling margin: ((fs - 2fmax) / 2fmax) × 100

Alias frequency: falias = |f - round(f / fs) × fs|

Normalized frequency: f / fs cycles per sample

Digital angular frequency: Ω = 2πf / fs rad/sample

These relations help evaluate whether a chosen sample rate preserves the original signal or folds higher components into lower apparent frequencies.

How to Use This Calculator

  1. Enter the highest frequency present in the original signal.
  2. Enter the actual sampling frequency used by the acquisition system.
  3. Set a test tone frequency for alias analysis and the waveform graph.
  4. Choose amplitude, phase, and capture duration for the plotted signal.
  5. Click Calculate to show results above the form.
  6. Review the verdict, Nyquist rate, sampling margin, and alias frequency.
  7. Use the CSV or PDF buttons to export the current result set.
  8. Inspect the Plotly graph to compare continuous and sampled waveforms.

FAQs

1. What does the sampling theorem state?

It states that a band-limited signal can be reconstructed from samples when the sampling frequency is at least twice the highest signal frequency. That minimum threshold is the Nyquist rate.

2. What is the Nyquist rate?

The Nyquist rate equals two times the highest frequency present in the signal. Sampling below this level can cause spectral overlap and incorrect reconstruction.

3. Why does aliasing happen?

Aliasing happens when the sample rate is too low to separate higher-frequency components. Those components fold into lower apparent frequencies inside the sampled data.

4. Is sampling exactly at twice the frequency enough?

It is the theoretical minimum for ideal band-limited signals. Real systems usually sample faster to allow filter roll-off, timing tolerance, and better numerical stability.

5. What does oversampling improve?

Oversampling increases design margin, reduces alias risk, eases anti-alias filter requirements, and often improves digital processing robustness for noisy or practical signals.

6. What does alias frequency mean?

Alias frequency is the folded frequency observed after undersampling. It is the misleading lower-frequency component that appears in place of the true tone.

7. Why include a test tone frequency?

The test tone lets you examine how one specific component behaves under the chosen sampling rate. It also drives the waveform graph and alias calculation.

8. Can this calculator help with real acquisition systems?

Yes. It is useful for checking converters, instruments, controllers, and digital signal chains where frequency content, timing, and alias risk matter.

Related Calculators

joint probability calculatorhuffman coding calculatormaximum likelihood estimate calculatorconditional probability calculatorinformation content calculatorlog likelihood ratio calculatorshannon fano coding calculatorrun length encoding calculatorgolomb coding calculatorrelative entropy calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.