PWM to Voltage Calculator

Average voltage of a PWM signal for a given supply and duty cycle.

How it is calculated

The average voltage of a PWM signal is the supply voltage multiplied by the fraction of time the signal is on: V_avg = V_supply × duty ÷ 100. The supply voltage is in volts and the duty cycle is a percentage from 0 to 100; values outside that range give no result. The answer is shown in volts with two decimals. The formula assumes the signal swings between 0 V and the supply voltage with a clean square wave, and that the load or a filter averages it. It does not use the switching frequency, so it cannot tell you whether the load will actually smooth the signal, and it ignores switch losses and voltage drops in the driver.

Worked example

A 12 V supply is switched with a 35% duty cycle. Average voltage = 12 × 35 ÷ 100 = 12 × 0.35 = 4.20 V. The output sits at 12 V for 35% of each cycle and at 0 V for the remaining 65%. A DC motor or LED driven this way behaves roughly as if it received 4.20 V, but the actual voltage across it still jumps between 0 and 12 V unless a filter smooths it.

Try this example →

Common mistakes

  • Entering the duty cycle as a fraction (0.35). The field is in percent, so 0.35 means 0.35% and gives only 0.04 V.
  • Entering a microcontroller's raw PWM value (for example 0 to 255 on an 8-bit output). Convert it to percent first: 255 is rejected, and 128 is about 50%.
  • Assuming the output is a steady voltage. The real signal still switches between 0 V and the supply; only the average equals this figure unless you add a filter.
  • Using the logic-level voltage when the load is driven from a separate supply. Use the voltage that is actually switched across the load.
  • Expecting the frequency to change the result. The average depends only on the duty cycle, though frequency matters for flicker, motor noise and filter design.

About this calculator

Pulse-width modulation (PWM) switches a signal rapidly between a supply voltage and zero (or ground); the fraction of each cycle spent "on" is the duty cycle. Because most loads (motors, LEDs, filters) respond to the time-averaged signal rather than the raw switching, the effective average voltage is simply V_avg = duty cycle × V_supply — a 25% duty cycle on a 12V line produces an average of 3V.

Embedded and electronics engineers, along with Arduino and Raspberry Pi hobbyists, use this relationship constantly when driving DC motor speed, dimming LEDs, or generating an approximate analog voltage from a microcontroller's digital output pins.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators