PWM Duty Cycle Calculator

Calculate PWM duty cycle, frequency, period, on-time, and off-time.
Essential for motor control, LED dimming, and power electronics.

PWM Parameters

Pulse Width Modulation (PWM) controls power to a device with a digital signal that switches rapidly between fully on and fully off.
Varying the ratio of on-time to off-time sets the effective voltage the load sees. The reason to do it this way is efficiency: a transistor that is either saturated or cut off dissipates almost nothing, while a linear regulator burns the difference as heat.

Key PWM Parameters

Period (T): The total time of one complete on/off cycle T = 1 / f (where f is frequency in Hz)

Duty Cycle (D): The percentage of the period when the signal is HIGH (on) D (%) = (t_on / T) × 100

On-Time (t_on): How long the signal is HIGH in each cycle t_on = D × T / 100

Off-Time (t_off): How long the signal is LOW in each cycle t_off = T − t_on

Average Voltage: For a digital signal with amplitude V_high: V_avg = V_high × D / 100

Practical Applications

Application Typical PWM Frequency
LED dimming 200 Hz – 10 kHz (above flicker threshold)
DC motor speed control 1 kHz – 20 kHz
Audio amplifier (Class D) 200 kHz – 1 MHz
Servo motor control 50 Hz (20 ms period)
Power supply switching 20 kHz – 500 kHz
Fan speed control 25 kHz (PC fans standard)

Servo Control Special Case

Servo motors use a fixed 50 Hz (20 ms period) signal where:

  • 1 ms on-time = 0° (or minimum position)
  • 1.5 ms on-time = 90° (center)
  • 2 ms on-time = 180° (or maximum position)

The duty cycle for servo control is only 5–10%, but the pulse width controls position.

LED Dimming and Flicker

For LED dimming, frequencies below 100 Hz can cause visible flicker, especially in video. Frequencies above 1 kHz are generally safe. Many LED dimming systems use 10–50 kHz to avoid any perceptible flicker even with high-speed cameras.

Arduino/Microcontroller PWM

Most Arduino boards have built-in PWM on pins 3, 5, 6, 9, 10, 11. The default PWM frequency is:

  • Pins 5 and 6: ~980 Hz
  • Pins 3, 9, 10, 11: ~490 Hz

The analogWrite() function takes 0–255 where 0 = 0% and 255 = 100% duty cycle.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.