PWM Duty Cycle Calculator

Pulse-width modulation switches a signal on and off rapidly, and the fraction of each cycle it stays on (the duty cycle) sets the effective output. Enter the on time, the switching frequency, and the supply voltage to find the period, off time, duty cycle, and the average output voltage. PWM dimming, motor speed control, and switching regulators all rely on these relationships.

0.00
0.00
0.00
0.00

PWM formulas

Period T = 1 / f
Duty cycle (%) = (on time / T) * 100
Off time = T - on time
Average voltage = (duty fraction) * Vsupply

The average voltage assumes an ideal signal switching between 0 V and the supply voltage.

Worked example

A 1,000 Hz PWM signal is on for 0.0003 s with a 12 V supply. Period = 1 / 1,000 = 0.001 s. Duty cycle = (0.0003 / 0.001) * 100 = 30.00 percent. Off time = 0.001 - 0.0003 = 0.0007 s. Average voltage = 0.30 * 12 = 3.60 V.

PWM duty cycle: frequently asked questions

What is duty cycle?

Duty cycle is the fraction of each period that the signal is on, expressed as a percentage: duty = (on time / period) times 100. A 50 percent duty cycle is on for half the period.

How do period and frequency relate?

The period is the reciprocal of the frequency: T = 1 / f. A 1,000 Hz PWM signal has a period of 0.001 seconds (1 millisecond), within which the on and off times sum.

How is average voltage found?

For an ideal PWM signal switching between 0 and the supply voltage, the average output is the duty cycle times the supply: Vavg = duty fraction times Vsupply. This is the basis for PWM dimming and motor speed control.

What units does this calculator use?

Enter on time in seconds and frequency in hertz, or supply voltage in volts. The period and off time are returned in seconds, the duty cycle as a percentage, and the average voltage in volts.

Sources

Reviewed by the CalculatorHub team, edited by James Graham, 19 June 2026. See our methodology.