OFDM Subcarrier Simulator Back
Electrical & Communications

OFDM Subcarrier Simulator

Explore the physical layer of OFDM (orthogonal frequency-division multiplexing), the modulation shared by WiFi, 4G LTE and 5G. Adjust the subcarrier count, bandwidth, cyclic-prefix length and modulation to see the subcarrier spacing, symbol duration, CP overhead and data rate update in real time.

Parameters
Subcarrier count N
Number of orthogonal subcarriers splitting the band (FFT size)
Occupied bandwidth B
MHz
Total width of frequency occupied by the channel
Cyclic-prefix length fraction
Ratio of CP length to the useful symbol duration T_u
Subcarrier modulation
Sets the bits per subcarrier b
Results
Subcarrier spacing Δf (kHz)
Useful symbol T_u (µs)
Total symbol T_sym (µs)
CP overhead (%)
Raw data rate (Mbps)
Effective data rate (Mbps)
OFDM spectrum & symbol structure

Top: overlapping sinc spectra of the subcarriers. Each peak sits exactly on its neighbours' nulls — that is orthogonality. Bottom: the time-domain symbol structure, with the shaded segment at the front being the cyclic prefix.

Effective data rate vs subcarrier count N
Orthogonal spectra of adjacent subcarriers
Theory & Key Formulas

$$\Delta f=\frac{B}{N},\qquad T_u=\frac{1}{\Delta f},\qquad T_{sym}=T_u+T_{cp}$$

Subcarrier spacing Δf, useful symbol duration T_u and total symbol duration T_sym. B: occupied bandwidth, N: subcarrier count, T_cp: cyclic-prefix duration.

$$R_{eff}=\frac{N\cdot b}{T_{sym}}$$

Effective data rate R_eff, where b is the bits per subcarrier (BPSK=1, QPSK=2, 16-QAM=4, 64-QAM=6). The cyclic prefix trades a little rate for immunity to multipath.

What is OFDM?

🙋
I keep hearing that both WiFi and 5G use something called "OFDM". What is it actually doing?
🎓
In short, instead of sending one wide, fast stream, it splits the data across hundreds of slow, narrow streams sent all at once. OFDM stands for Orthogonal Frequency-Division Multiplexing. You take a wide band, divide it into N narrow subcarriers, put a little data on each, and transmit them in parallel. WiFi, 4G LTE, 5G, digital terrestrial TV, ADSL — almost all modern wireless and wired links use this idea.
🙋
Wait, why bother chopping it up? Wouldn't one fat fast carrier be simpler?
🎓
That is the trap. One very fast wideband carrier is badly hurt by multipath. Radio waves bounce off walls and buildings, so several delayed echoes arrive after the direct signal. If the symbol is short, those late echoes overlap the next symbol and smear it. That is inter-symbol interference (ISI), and it gets worse the faster you go. OFDM's answer is "do not go fast". Split the data across hundreds of slow subcarriers and make each symbol long, so the echo delay becomes small relative to the symbol duration and stops mattering.
🙋
If you cram that many subcarriers together, won't the neighbours mix and interfere?
🎓
Normally yes — but the "Orthogonal" in OFDM is the key. If you set the spacing exactly to Δf = B/N, the spectral peak of one subcarrier lands precisely on the nulls (zero points) of every other subcarrier. So although the spectra overlap, they do not interfere. Look at the OFDM spectrum on the top right — each peak pierces its neighbour's zero point. Better still, this whole set of subcarriers can be generated and recovered together with one pair of fast operations, the inverse FFT and the FFT. That made OFDM practical.
🙋
I see. So what is the "cyclic prefix" for? It is one of the sliders on the left.
🎓
That is OFDM's other invention. You copy the tail of each symbol and paste it to the front as a "guard time". As long as the longest echo arrives within that CP time, inter-symbol interference is completely eliminated — it goes to zero. And as a bonus, the CP lets the receiver treat the channel as a circular convolution, so after the FFT it just multiplies each subcarrier by one number to undo the distortion. Each subcarrier is narrow, so the channel looks essentially flat across it. The price is that the CP time costs you rate. Raise the CP fraction on the left and watch the "CP overhead" climb.
🙋
More subcarriers means more data carried, so I expected it to be faster — but the chart is almost flat. Why?
🎓
Good eye. Adding subcarriers does raise the bits per symbol N·b. But at the same time the spacing Δf = B/N narrows, and the symbol duration T_u = 1/Δf grows by the same factor. So the rate N·b/T_u cancels out and stays essentially constant. What really sets the speed is the bandwidth B and the modulation b. Think of N not as a speed knob, but as the dial that balances multipath robustness (more is better) against Doppler and phase-noise robustness (fewer is better).

Frequently Asked Questions

The subcarrier spacing is Δf = B / N, where B is the occupied bandwidth and N the number of subcarriers. Since the band is split evenly into N pieces, adding more subcarriers makes each one narrower. A smaller spacing means a longer useful symbol duration T_u = 1/Δf, which is relatively more robust against multipath delay but more sensitive to Doppler and phase noise. The number of subcarriers is therefore chosen as a balance between the two.
The cyclic prefix (CP) is a guard interval formed by copying the tail of the OFDM symbol and prepending it to the front. As long as the longest delayed echo from multipath arrives within the CP duration, the smearing of one symbol into the next (inter-symbol interference, ISI) is completely eliminated. The CP also lets the receiver treat the channel as a circular convolution, so a single-tap equalizer per subcarrier corrects it after the FFT. The price is the cyclic-prefix overhead — the data rate drops by the CP fraction of time.
The raw data rate counts the bits carried over the useful symbol duration alone: rawRate = bitsPerSym / T_u. The effective data rate divides by the total symbol duration T_sym, which includes the CP time: effRate = bitsPerSym / T_sym, and is closer to the throughput actually delivered to the user. The gap between them is the cyclic-prefix overhead; with a CP fraction of 0.25 the overhead is 0.25/1.25 = 20%, so the effective rate is 80% of the raw rate.
No, it stays essentially the same. Increasing the subcarrier count N raises the bits per symbol N·b, but at the same time the spacing Δf narrows and the symbol duration T_u grows proportionally, so the rate N·b/T_u cancels out and stays roughly constant. Data rate is governed by the occupied bandwidth B and the modulation order (bits per subcarrier b); N is the knob that trades multipath robustness against Doppler robustness.

Real-World Applications

WiFi (wireless LAN): IEEE 802.11a/g/n/ac/ax are all built on OFDM. A 20 MHz channel uses an FFT size of 64 or 256, with subcarrier spacing of 312.5 kHz (78.125 kHz in WiFi 6). Even with the many wall reflections of a crowded office or home, the cyclic prefix absorbs the echoes and keeps the link stable. WiFi 6 also added OFDMA, an extension that assigns groups of subcarriers to several users at once.

4G LTE / 5G NR physical layer: The cellular downlink is OFDM itself. LTE fixed the subcarrier spacing at 15 kHz, but 5G NR made it variable (numerology) — 15, 30, 60 or 120 kHz — so T_u and the CP can be switched to suit wide millimetre-wave bands or high-speed mobility. Watching T_u and the CP track Δf in this tool is exactly the intuition behind that numerology design.

Digital terrestrial broadcasting and DAB: Japan's ISDB-T, Europe's DVB-T and the DAB digital radio standard are OFDM systems with thousands of subcarriers. In broadcasting, signals from several transmitters on the same frequency arrive as "giant multipath", but a long CP absorbs it and enables a single-frequency network (SFN). The spacing between transmitters is designed by working back from the CP length.

Wired links (DSL and power-line communication): ADSL and VDSL use DMT (discrete multitone), a flavour of OFDM tailored to copper wire. A phone line attenuates very differently across frequency, so "bit loading" varies the modulation (bits b) per subcarrier, placing more bits on the healthy frequencies to wring the most out of the line.

Common Misconceptions and Pitfalls

The most common misconception is that "more subcarriers always means a faster link". As the "effective data rate vs subcarrier count" chart in this tool shows, the curve is almost flat: increasing N barely changes rawRate = N·b/T_u. More subcarriers do raise the bits per symbol, but the narrower Δf stretches the symbol duration by the same proportion and cancels the gain. Speed is set by the bandwidth B and the modulation order b. N is the dial that balances multipath robustness against Doppler robustness — not a throughput knob.

Next, the belief that "a longer cyclic prefix is always safer". It is true that a longer CP absorbs slower echoes and is more robust against ISI. But the CP is pure overhead — no data can be carried during that time. With a CP fraction of 0.25, the effective rate drops to 80% of the raw rate. Real systems measure the expected maximum delay (the delay spread) and choose the shortest CP that just covers it. Too long wastes bandwidth, too short breaks under ISI — it is a tug-of-war.

Finally, the idea that "OFDM is a perfect scheme with no weaknesses". OFDM has two clear weaknesses. One is a high PAPR (peak-to-average power ratio): when the phases of many subcarriers happen to align, a large instantaneous peak appears, pushes the transmit amplifier into its non-linear region and creates distortion. The other is sensitivity to frequency offset and phase noise — the orthogonality of the subcarriers only holds when the frequencies are precisely aligned, so any drift causes inter-carrier interference (ICI). Doppler shift during fast motion fails for the same reason. Handling these (PAPR reduction, accurate synchronization) is where OFDM receiver design earns its keep.

How to Use

  1. Set number of subcarriers (nSubNum) between 64 and 2048; typical WiFi 802.11ac uses 256 subcarriers
  2. Define subcarrier bandwidth range (nSubRange) to control frequency spacing; 5G NR uses 15, 30, 60, or 120 kHz spacing
  3. Select bandwidth allocation (bwNum) from 20 MHz to 160 MHz; LTE Category 4 uses 20 MHz FDD channels
  4. Adjust cyclic prefix length (cpNum) as normal (1/4 symbol) or extended (1/8) for multipath environments
  5. Read output metrics: subcarrier spacing Δf, useful symbol duration T_u, total symbol duration T_sym, CP overhead percentage, and raw versus effective data rates

Worked Example

802.11ac WiFi configuration: 256 subcarriers over 80 MHz bandwidth with normal 800 ns cyclic prefix. Subcarrier spacing Δf = 80 MHz / 256 = 312.5 kHz. Useful symbol T_u = 1 / 312.5 kHz = 3.2 µs. Total symbol T_sym = 3.2 µs + 0.8 µs = 4.0 µs. CP overhead = 0.8 / 4.0 = 20%. With 256 subcarriers and 64-QAM modulation (6 bits/subcarrier), raw data rate ≈ 256 × 6 × 250 = 384 Mbps; effective rate after CP loss ≈ 307 Mbps accounting for pilot subcarriers and guard bands.

Practical Notes

  1. Smaller subcarrier spacing (7.5 kHz in 5G NR) improves Doppler tolerance for high-speed scenarios but increases PAPR and computational complexity
  2. Extended CP (667 ns in LTE-M) reduces data rate by 14% but handles delay spread up to 67 µs in rural macrocells
  3. Guard band and pilot overhead typically consume 10-15% of total subcarriers; 5G NTE0-6 GHz allocations reserve 9 subcarriers minimum per resource block
  4. Increasing bandwidth from 20 MHz to 160 MHz quadruples raw throughput but requires flat channel conditions; use smaller spacing for NLOS propagation