Figure 1: Duty cycle D = ton/T. The average voltage equals D × Vpeak. Higher duty cycle = higher average output. 50% duty gives half the peak voltage.
Table of Contents
What Is Duty Cycle?
Duty cycle is the percentage of one complete cycle that a signal is ON (high). A 50% duty cycle means the signal is high for half the period and low for the other half. It is the fundamental control parameter behind PWM (pulse width modulation) — changing the duty cycle changes the effective voltage and power delivered to a load without any analogue conversion.
The calculator above has two modes. Mode 1 (forward) finds the duty cycle from ON time and period. Mode 2 (reverse) finds the required pulse width from a target duty cycle and period. Both modes show a real-time canvas waveform of the PWM signal with an average voltage line. The PWM Frequency Calculator complements this by calculating period, resolution, and timer prescaler settings.
The Formulas
D = (ton / T) × 100%Frequency:
f = 1 / TOFF time:
toff = T − tonAverage voltage:
Vavg = D × Vpeak — DC equivalentRMS voltage:
Vrms = Vpeak × √D — heating equivalentAverage power:
Pavg = D × Ppeak
Mode 1 — Forward: Find Duty Cycle
Enter ON time (ton) and period (T) in ms, µs, or seconds. Optionally enter peak voltage for Vavg and Vrms calculations. The canvas waveform draws 3 complete PWM cycles at the calculated duty cycle with a dashed average voltage line.
Example: LED Dimming (10% at 5 V)
D = 1/10 × 100 = 10%
f = 1/0.01 = 100 Hz
toff = 10 − 1 = 9 ms
Vavg = 0.10 × 5 = 0.5 V
Vrms = 5 × √0.10 = 5 × 0.316 = 1.58 V
The LED sees 5 V for 1 ms then 0 V for 9 ms every cycle. The average voltage of 0.5 V produces roughly 10% perceived brightness. At 100 Hz the flicker is fast enough to be invisible to the eye.
Example: Motor at Half Speed (50% at 12 V)
D = 5/10 × 100 = 50%
f = 1/0.01 = 100 Hz
Vavg = 0.50 × 12 = 6 V
Vrms = 12 × √0.50 = 12 × 0.707 = 8.49 V
The motor sees an average of 6 V from a 12 V supply — approximately half speed. Vrms is 8.49 V, which is higher than Vavg because the squared waveform concentrates more energy in the ON pulses.
Example: Motor Drive at 25 kHz (Above Audible)
D = 20/40 × 100 = 50%
f = 1/40µs = 25 kHz
25 kHz is above the audible range (20 kHz). Motor drive PWM at this frequency eliminates the audible whine that lower frequencies produce. The calculator works without a voltage input — duty cycle and frequency are still computed. The Bandwidth Calculator can determine if the system bandwidth is sufficient to pass the 25 kHz switching edges cleanly.
Mode 2 — Reverse: Find Pulse Width
Enter desired duty cycle (%) and period. The calculator returns the required ON time: ton = D × T. All other outputs (frequency, voltages, waveform) are computed identically to forward mode.
Example: 30% Duty at 1 kHz
ton = 0.30 × 1 ms = 300 µs
toff = 1 − 0.3 = 700 µs
Set your microcontroller timer compare register to produce a 300 µs pulse every 1 ms.
Example: Servo Control (50 Hz, Centre Position)
ton = 0.075 × 20 ms = 1.5 ms
Standard hobby servos expect a 50 Hz signal. The pulse width encodes position: 1.0 ms = 0° (5% duty), 1.5 ms = 90° (7.5%), 2.0 ms = 180° (10%). The servo reads the pulse width, not the duty cycle percentage. The Signal Attenuation Calculator can check whether long servo cable runs degrade the pulse edges enough to cause jitter.
Average Voltage vs RMS Voltage
Vrms = Vpeak × √D — the heating equivalent. This determines I²R power dissipation in resistive loads. At 50% duty: Vrms = 12 × 0.707 = 8.49 V. Higher than Vavg because the squared waveform concentrates energy in the ON pulses.
For motors and LED dimming, Vavg is the relevant number — it sets speed or brightness. For heater control and resistive loads, Vrms determines the actual power delivered. At 50% duty, Vrms delivers 50% of peak power (not 25%), because power is proportional to V². The Decibel Calculator can express this power ratio in dB: 50% power = −3 dB.
Common PWM Applications
LED Dimming
Duty cycle directly controls perceived brightness. 10% ≈ dim. 50% ≈ half brightness. 100% = full on. PWM frequency should be above 200 Hz to avoid visible flicker — 1 kHz or higher for video-compatible applications to avoid banding on camera.
Motor Speed Control
Vavg = D × Vsupply sets the effective voltage to the motor. 50% duty on a 12 V supply gives approximately 6 V and half speed. The relationship is not perfectly linear due to motor back-EMF, but duty cycle remains the primary speed control parameter. PWM frequency above 20 kHz avoids audible motor whine.
Switching Power Supplies
The converter adjusts duty cycle to regulate output voltage. In a buck converter: Vout = D × Vin. At 50% duty from 12 V input, Vout = 6 V. The feedback loop continuously adjusts D to hold Vout constant as the load changes.
Servo Control
50 Hz (20 ms period). Pulse width 1.0–2.0 ms encodes position. The duty cycle is only 5–10%, but the servo reads absolute pulse width, not duty cycle. The calculator’s reverse mode is useful here: enter 7.5% at 20 ms to confirm the pulse width is 1.5 ms (centre position).
Heating Control
Slow PWM (seconds to minutes period) switches heaters on and off. A 2 kW heater at 40% duty delivers 800 W average. Vrms and Pavg from the calculator tell you the effective heating power. The Gain Calculator can help size a driver amplifier if the control signal needs boosting before reaching the heater relay.
Frequently Asked Questions
What is duty cycle?
How does duty cycle affect average voltage?
Why is Vrms different from Vavg?
What duty cycles do servos use?
Can duty cycle be exactly 0% or 100%?
What PWM frequency should I use?
Related Calculators
Browse all Electronics Calculators →