← All tools

PWM Signal Laboratory

Build a square wave from frequency and duty, then read its timing, average and RMS values against a live waveform.

Calculator inputs and results

Every value updates as you type. Sliders and numeric fields stay in sync.

FREQUENCY1 kHz
DUTY25 %
How much time the waveform should show. The plot stays stable instead of animating.
Result
Period T
—
On-time ton
—
Off-time toff
—
Duty D
—
Time-average voltage
—
RMS voltage
—
Waveform & time-averageIDEAL SQUARE WAVE
Live ideal PWM waveform with its mathematical time-average A two-level square wave drawn for the selected frequency and duty cycle, with a dashed line at the duty-weighted average voltage. V_HIGH0 V window 3.00 ms · 3 cycles dashed = average
One cycle: 250 µs high, 750 µs low. The dashed line is the mathematical time-average.
T = 1/fsw · ton = D · T · toff = T − ton
Ideal square wave between 0 V and VH: Vavg = D · VH · VRMS = VH · √D
Read this before you commit a design

This is an ideal two-level waveform with zero rise and fall time. Real GPIO outputs have finite edges, driver delay, and loading; a gate driver, LED string, motor or RC filter each responds to the waveform differently. The average is what a slow load integrates, not what a fast one sees. Nothing here is a measurement.