Duty Cycle Calculator

Calculate the duty cycle percentage of a pulse width modulated (PWM) signal.

Calculator by SuperCalX: formulas, worked examples and 250+ free calculators.

Your values

Result

Enter your values and the result appears here.

Analysis

Interpretation of the current calculator output

Enter values to see detailed analysis and insights.

How to Use

Step-by-step instructions
  1. 1Enter the On Time (high state duration).
  2. 2Enter the Off Time (low state duration).
  3. 3The calculator will show the duty cycle and frequency (assuming ms input).

Duty Cycle

Calculates the percentage of one period in which a signal is active.
Duty (%) = (On Time / (On Time + Off Time)) × 100

Variables:

On TimeDuration signal is high
Off TimeDuration signal is low

Example

Square Wave

Inputs:

On:10 ms
Off:10 ms

Steps:

  1. 1.Period = 10 + 10 = 20 ms
  2. 2.Duty = (10 / 20) * 100 = 50%
Result:
50%

Duty Cycle Calculator: the short answer

Duty cycle = on time ÷ (on time + off time) × 100. A PWM signal that is on for 3 ms and off for 7 ms has a 30% duty cycle and a period of 10 ms, which is a frequency of 100 Hz. Average voltage of a 5 V PWM signal at 30% duty is about 1.5 V.

  • Frequency = 1 ÷ period.
  • Average output = duty cycle × peak voltage for a rectangular wave.
  • Motors and LEDs are commonly dimmed or speed-controlled with PWM.

By the SuperCalX team · Reviewed by Dr. Ahmed Mortuza Saleque, founder and editor · Last reviewed · How we check our calculators

Typical PWM frequencies

ApplicationFrequency
Hobby servos50 Hz (20 ms period)
LED dimming≥ 1 kHz to avoid flicker
DC motor control1 – 20 kHz
Switching power supplies100 kHz – several MHz

Duty cycle and battery life

A device that runs at full power only part of the time draws an average current of duty × peak current; feed that average into the battery life calculator.

Controlling motors and LEDs with PWM

Switching fully on and off wastes little power in the switch, so PWM controls brightness or speed efficiently. LED brightness looks roughly proportional to duty cycle, though our eyes perceive it non-linearly, so many dimmers use a curve. DC motor speed rises with duty cycle under steady load.

For servos the duty cycle is not what matters: position is set by pulse width, usually 1 ms (one end), 1.5 ms (centre) and 2 ms (other end) in a 20 ms frame.

Worked examples

On 3 ms, off 7 ms, 5 V

  1. Duty = 3 ÷ 10 = 30%.
  2. Frequency = 1 ÷ 0.010 s = 100 Hz.
  3. Average voltage = 0.3 × 5.

30% duty, 100 Hz, 1.5 V average.

Common mistakes

  • Confusing duty cycle with frequency; you can change one without the other.

Duty Cycle Calculator FAQ

What does 50% duty cycle mean?

The signal is on and off for equal times, a square wave.

How are servos controlled?

By pulse width, usually 1 to 2 ms within a 20 ms period, rather than duty percentage.

What is the RMS voltage of a PWM signal?

For a 0/V square wave it is V × √(duty cycle). At 25% duty on 12 V it is 6 V RMS, while the average is 3 V.

Why do some LEDs flicker on camera?

Low PWM frequencies, under a few hundred hertz, can beat with a camera's frame rate.

What is frequency?

Frequency is the number of cycles per second (Hz). If your time is in milliseconds, Frequency = 1000 / Period.

Add this calculator to your website

Teachers, bloggers and businesses can show the Duty Cycle Calculator on their own pages for free. Copy this code and paste it into your page's HTML:

Please keep the credit link so readers can find the formula, worked examples and guide.