PWM Duty Cycle Math: Average and RMS Voltage Explained
Calculate PWM duty cycle, average voltage, and RMS voltage from on-time and period. Includes worked examples and common mistakes engineers make.
Contents
- Why PWM Calculations Matter More Than You Think
- The Core Relationships
- Average Voltage
- RMS Voltage — Where It Gets Interesting
- Worked Example: LED Dimming Circuit
- When Average vs. RMS Actually Matters
- Common Mistakes and Gotchas
- Confusing duty cycle direction
- Forgetting about dead time
- Assuming linear brightness perception
- Ignoring rise and fall times
- Using the wrong voltage for the calculation
- Frequency Selection Considerations
- Beyond Ideal Waveforms
- Try It
Why PWM Calculations Matter More Than You Think
Pulse-width modulation is everywhere. Motor drives, LED dimmers, switching regulators, audio amplifiers — if you're doing anything with power electronics, you're probably staring at a PWM signal at some point. The math looks trivial until you actually need to get it right.
Here's the thing: most engineers can eyeball a duty cycle from an oscilloscope trace. But when you're designing a circuit from scratch, you need to work backwards. You know you want 3.3 V average from a 5 V supply. What duty cycle does that require? And what's the RMS voltage that your load actually sees? That second question trips people up constantly.
The Core Relationships
Let's establish the fundamentals. A PWM signal has an on-time and a period . The duty cycle is simply:
Expressed as a percentage, you multiply by 100. The frequency is the reciprocal of the period:
Off-time falls out naturally:
Average Voltage
For a signal that switches between 0 V and some supply voltage , the average (DC) voltage is:
This is what a simple RC filter would give you if the cutoff frequency is well below the PWM frequency. It's also what determines the average current through an inductive load like a motor winding.
RMS Voltage — Where It Gets Interesting
RMS voltage for a PWM waveform isn't the same as average voltage. For a signal that's either or 0:
Why the square root? Because RMS is defined as the square root of the mean of the squared voltage. During , the voltage squared is . During , it's zero. Average the squared values over a full period, take the square root, and you get .
This distinction matters enormously for power calculations. If you're driving a resistive heater with PWM, the power delivered depends on RMS voltage, not average voltage. A 50% duty cycle from a 12 V supply gives you 6 V average but about 8.49 V RMS. The power into a 10 Ω resistor would be V_RMS² / R = 7.2 W, not the 3.6 W you'd get from naively using the average voltage.
Worked Example: LED Dimming Circuit
Let's walk through a real scenario. You're designing an LED backlight driver for a display panel. The LED string has a forward voltage of 28 V and runs from a 32 V rail through a current-limiting circuit. You want to dim the LEDs to 40% brightness using PWM at 1 kHz.
Given:- Supply voltage: V
- Target brightness: 40% (which means 40% average current, so 40% duty cycle)
- PWM frequency: Hz
Now, for LEDs specifically, brightness perception is roughly proportional to average current, so the average voltage calculation is what you care about for dimming control. But if you were calculating power dissipation in a resistive element in the same circuit — say, a current sense resistor — you'd need the RMS value.
You can verify these calculations quickly by plugging the numbers into the open the PWM Duty Cycle Calculator.
When Average vs. RMS Actually Matters
The average/RMS distinction isn't academic. Here are three cases where getting it wrong causes real problems:
Resistive heating elements. A PWM-controlled heater's power output depends on RMS voltage squared divided by resistance. Use average voltage and you'll underestimate power by a factor of . At 25% duty cycle, that's a factor of 2 error. Motor torque calculations. DC motor torque is proportional to average current, which comes from average voltage divided by winding resistance (ignoring back-EMF for a moment). But I²R losses in the windings depend on RMS current. A motor running at 50% duty cycle has higher copper losses than the average current would suggest. Capacitor ripple current ratings. The RMS current through a filter capacitor in a PWM circuit determines how much it heats up. Electrolytic capacitors have ripple current limits, and exceeding them shortens their life dramatically. You need the RMS value here, not average.Common Mistakes and Gotchas
Confusing duty cycle direction
This sounds stupid but happens constantly. Is 100% duty cycle fully on or fully off? In most conventions, 100% means the output is high for the entire period — fully on. But some motor controllers and LED drivers invert this, especially if they're using low-side switching with active-low logic. Always check the datasheet or schematic.
Forgetting about dead time
In H-bridge and half-bridge circuits, there's intentional dead time inserted between turning off one switch and turning on the other. This prevents shoot-through current but also reduces the effective duty cycle range. If your controller inserts 500 ns of dead time on each transition at 100 kHz (10 μs period), you've lost 10% of your duty cycle range.
Assuming linear brightness perception
If you're dimming LEDs for human viewing, perceived brightness follows roughly a logarithmic curve. A 50% duty cycle doesn't look like 50% brightness — it looks much brighter than that. You need gamma correction in your duty cycle mapping. This isn't a PWM math error per se, but it's where the math meets reality.
Ignoring rise and fall times
The formulas assume instantaneous switching. Real MOSFETs and gate drivers have finite rise and fall times. At low frequencies this is negligible. At 500 kHz with 50 ns transitions, those edges eat up 5% of your period. The effective duty cycle and the calculated duty cycle start to diverge, and your average voltage won't be quite what you expected.
Using the wrong voltage for the calculation
The supply voltage in the formula is the voltage the load actually sees during the on-time. If you have a 12 V supply but 0.5 V of drop across your MOSFET and another 0.3 V across the current sense resistor, the effective supply voltage is 11.2 V. Small errors here compound when you're trying to hit a precise voltage.
Frequency Selection Considerations
The calculator gives you frequency from period, but choosing the right PWM frequency in the first place involves tradeoffs.
For motor drives, you generally want to be above the audible range — at least 20 kHz — to avoid whining. But higher frequencies mean more switching losses in your MOSFETs and more core losses in any inductors. Most motor controllers settle somewhere between 20 kHz and 50 kHz.
For LED dimming, you can often get away with much lower frequencies if flicker isn't visible. But camera sensors pick up flicker that humans don't see, so anything meant to be photographed or filmed needs at least a few kHz.
Switching regulators have their own constraints based on inductor sizing and transient response requirements. A buck converter running at 500 kHz needs a much smaller inductor than one running at 50 kHz, but the controller and FET losses go up.
Beyond Ideal Waveforms
Everything above assumes a clean rectangular pulse. Reality is messier. Parasitic inductance causes ringing on the edges. Reverse recovery in body diodes creates current spikes. EMI filters add their own frequency-dependent effects.
For most duty cycle and average voltage calculations, you can ignore these second-order effects. But if you're doing precision work — say, calibrating a PWM-based DAC or measuring efficiency to three decimal places — you'll need to account for them. An oscilloscope with math functions can compute the actual average and RMS values of your real waveform, which is always the ground truth.
Try It
If you're working through a PWM design and want to quickly check your duty cycle, average voltage, and RMS calculations, open the PWM Duty Cycle Calculator. Plug in your on-time and period, and it'll give you all the derived values instantly. It's particularly handy when you're iterating on timing values and don't want to keep punching numbers into a calculator or spreadsheet.
Related Articles
Battery Internal Resistance: Performance Killer
Discover how battery internal resistance impacts power delivery, efficiency, and device performance in real-world electronics design.
Apr 25, 2026
Power ElectronicsSwitching Regulator Ripple: Engineer's Guide
Dive deep into switching regulator output ripple calculation with real-world techniques, critical design insights, and practical error analysis.
Apr 25, 2026
Power ElectronicsLDO Thermal Meltdown: Dropout Voltage Analysis
Master LDO linear regulator thermal design with our dropout voltage calculator — prevent power supply failures before they happen.
Mar 28, 2026