PWM Duty Cycle Calculator Formula

Understand the math behind the pwm duty cycle calculator. Each variable explained with a worked example.

Formulas Used

Average Voltage

v_average = v_amplitude * duty_fraction

Average Power

avg_power_w = pow(v_amplitude, 2) * duty_fraction / load_resistance_ohm

Peak Current

peak_current_a = v_amplitude / load_resistance_ohm

Variables

VariableDescriptionDefault
v_amplitudePWM Amplitude(V)12
duty_cycle_pctDuty Cycle(%)75
load_resistance_ohmLoad Resistance(Ω)10
duty_fractionDerived value= duty_cycle_pct / 100calculated

How It Works

PWM Duty Cycle

Formulas

V_avg = V_amplitude x D

P_avg = V^2 x D / R

Where D is the duty cycle (0 to 1). PWM is used for motor speed control, LED dimming, and switching power supplies.

Worked Example

12 V PWM at 75% duty cycle driving a 10 ohm load.

v_amplitude = 12duty_cycle_pct = 75load_resistance_ohm = 10
  1. 01D = 75 / 100 = 0.75
  2. 02V_avg = 12 x 0.75 = 9 V
  3. 03P_avg = 144 x 0.75 / 10 = 10.8 W
  4. 04Peak current = 12 / 10 = 1.2 A

Frequently Asked Questions

What frequency should I use?

Depends on application. Motors: 1-20 kHz. LEDs: above 200 Hz to avoid flicker. Switching regulators: 100 kHz to several MHz.

Is average voltage the same as DC?

For resistive loads with filtering, yes. Without filtering the load sees pulsed voltage.

How does PWM save power vs. linear?

The switch is either fully on or off, so it dissipates minimal power compared to a linear regulator which drops voltage as heat.

Ready to run the numbers?

Open PWM Duty Cycle Calculator