Duty Cycle Calculator

Duty Cycle Calculator

Popular AI Skill PRO

Enter Calculation

Formula

Duty Cycle=On Time (s)Period (s)×100%\text{Duty Cycle} = \frac{\text{On Time (s)}}{\text{Period (s)}} \times 100\%
Usage stats

Advertisement

Results

Duty Cycle
20
% of period the signal is ON
Off Time (s) 8
Frequency (Hz) 0.1

Report an error on this page

What Is Duty Cycle?

Duty cycle is the fraction of one full period during which a signal or system is active (ON), expressed as a percentage. It is a key parameter for pulse-width modulation (PWM), square waves, switching power supplies, motor control, lasers, and any pulsed signal. A 50% duty cycle means the signal is ON for exactly half of every cycle.

Square wave pulse showing on time, off time, and full period along a time axis
Duty cycle is the fraction of each period that the signal stays on.

How to Use This Calculator

Enter the pulse on time (how long the signal stays HIGH in one cycle) and the total period (the full length of one cycle). Both should use the same time unit — seconds in this tool. The calculator returns the duty cycle as a percentage, the OFF time, and the signal frequency.

The Formula Explained

The duty cycle is calculated as:

$$\text{Duty Cycle (\%)} = \frac{\text{Pulse On Time}}{\text{Total Period}} \times 100$$

The off time is simply the period minus the on time, and the frequency is the reciprocal of the period (\(f = 1 \div T\)).

Advertisement
Three square waves with different duty cycles: 25 percent, 50 percent, and 75 percent
Higher duty cycle means the signal spends more of each period in the on state.

Worked Example

Suppose a PWM signal has a pulse on time of 2 seconds within a total period of 10 seconds. The duty cycle is $$(2 \div 10) \times 100 = 20\%.$$ The off time is \(10 - 2 = 8\) seconds, and the frequency is \(1 \div 10 = 0.1\) Hz.

Typical Duty Cycles and PWM Frequencies by Application

The table lists commonly used duty cycle ranges and PWM frequencies. These are typical engineering values, not mandated standards. Actual designs vary with the hardware, the driver and the datasheet.

Application Typical duty cycle Typical frequency Notes
LED dimming about 0-100% 100 Hz to several kHz Stay above roughly 200 Hz to avoid visible flicker. Higher is safer for cameras and sensitive eyes.
Hobby servo control about 5-10% 50 Hz (20 ms period) Pulse width of 1-2 ms, so 1 ms / 20 ms = 5% and 2 ms / 20 ms = 10%. The pulse width carries the position information, not the percentage.
DC motor speed control about 0-100% about 1-20 kHz Frequencies above about 20 kHz are often chosen to push motor whine out of the audible range.
Switching power supply / buck converter roughly Vout / Vin tens of kHz to MHz The ideal buck relation in continuous conduction is \(D \approx \frac{V_{out}}{V_{in}}\). Losses shift the real value slightly.
Standard square wave 50% any On time equals off time.

Always check the datasheet of the specific device you are driving for its allowed frequency and pulse width limits.

Period, Frequency and Time Unit Conversions

Frequency and period are reciprocals: \(f = \frac{1}{T}\) and \(T = \frac{1}{f}\). Duty cycle uses the period, so on time and period must be in the same unit before you divide.

Period (T) Frequency (f)
1 s 1 Hz
100 ms 10 Hz
20 ms 50 Hz
10 ms 100 Hz
1 ms 1 kHz
100 µs 10 kHz
10 µs 100 kHz
1 µs 1 MHz

Unit relations

  • 1 ms = 0.001 s
  • 1 µs = 0.000001 s
  • 1 kHz = 1,000 Hz; 1 MHz = 1,000,000 Hz
  • Off time = period − on time
Advertisement

Duty Cycle Scenarios Compared

Here the period is fixed at 1 ms (1 kHz) and only the on time changes. The average voltage is for an idealized 5 V logic-level PWM signal, calculated as \(V_{avg} = D \times 5\ \text{V}\).

On time Duty cycle Off time Frequency Average voltage (5 V PWM)
0.1 ms 10% 0.9 ms 1 kHz 0.5 V
0.25 ms 25% 0.75 ms 1 kHz 1.25 V
0.5 ms 50% 0.5 ms 1 kHz 2.5 V
0.75 ms 75% 0.25 ms 1 kHz 3.75 V
0.9 ms 90% 0.1 ms 1 kHz 4.5 V

Example: for 0.25 ms on in a 1 ms period, \(D = \frac{0.25}{1} \times 100\% = 25\%\), and the average is \(0.25 \times 5 = 1.25\ \text{V}\). The frequency stays at 1 kHz in every row because the period never changes.

FAQ

Can I use milliseconds or microseconds? Yes — as long as on time and period use the same unit, the duty cycle percentage is correct. Note that the frequency output assumes the period is in seconds.

What does a 100% duty cycle mean? The signal is always ON; it never turns off. A 0% duty cycle means it is always OFF.

How is duty cycle related to average voltage? For a PWM signal switching between 0 V and Vmax, the average voltage equals \(\text{duty cycle} \times V_{\max}\), which is why PWM is used to control LED brightness and motor speed.

Last updated:

Most popular in Physics and Engineering

View all Physics and Engineering calculators