Duty Cycle Calculator
Calculate duty cycle with instant, accurate results and clear step-by-step output.
Pick the unit for both on-time and period.
Time the signal is HIGH per cycle.
Total cycle time (on + off).
For average voltage and power.
Average power dissipated: P = V_peak² × (DC/100) / R.
About
Duty cycle (DC) is the fraction of one period in which a signal or system is active. The defining formula is DC = (on_time / period) × 100%, where on_time is the duration of the active phase and period is the total cycle time (on + off). Equivalently, DC = on_time × frequency × 100% (since frequency = 1 / period). The unit is a percentage: 0% means always off, 100% means always on, 50% means a symmetric square wave that is on for exactly half of each cycle.
The most common application is pulse-width modulation (PWM) — a digital signal whose duty cycle is varied to control the average power delivered to a load. For a PWM signal switching between 0 and a peak voltage V_peak, the average (DC-equivalent) voltage is V_avg = V_peak × (DC/100). The average power into a resistive load R is P_avg = V_peak² × (DC/100) / R. The (DC/100) factor appears because the load only dissipates power during the on-time.
PWM is the dominant technology for efficient power control because the switching transistor (MOSFET or IGBT) is either fully on (low V, high I, low loss) or fully off (no I, no loss) — efficiency is typically 90-98%. A linear regulator, by contrast, dissipates the unused voltage as heat in the regulator itself, with efficiency dropping as V_out / V_in drops. PWM is the standard for LED dimming (200-1000 Hz to avoid visible flicker), motor speed control (10-20 kHz, above audible), switching power supplies (100 kHz-2 MHz, smaller inductors), and Class-D audio amplifiers (250-500 kHz).
A 50% duty cycle is called a symmetric square wave — the signal is on for exactly half of each period. Symmetric square waves have only odd harmonics in their Fourier series (1f, 3f, 5f, ...), which simplifies filtering and reduces electromagnetic interference (EMI). Most digital clock signals are designed to be 50% duty cycle to minimize jitter and EMI; many PLL-based clock generators include a duty-cycle corrector to enforce 50%.
Frequency selection for PWM involves tradeoffs. Higher frequency allows smaller inductors and capacitors (smaller ripple for the same filtering), but switching loss in the MOSFET scales with frequency (each transition dissipates a fixed energy). The optimal frequency is the lowest that meets your ripple, EMI, and response-time requirements. For LED dimming, 200-1000 Hz is typical; for motor control, 10-20 kHz; for switching regulators, 100 kHz to 2 MHz; for Class-D audio, 250-500 kHz.
How to Use
- 1Enter the on-timeType how long the signal is active per cycle, in seconds, milliseconds (ms), or microseconds (µs).
- 2Enter the period (or use frequency)Type the total cycle time (on + off). The calculator also accepts frequency in Hz; period = 1/frequency.
- 3Read the duty cycleThe hero shows the duty cycle as a percentage. The breakdown also shows frequency, off-time, and average voltage for a given peak voltage.
- 4Compute average voltage and powerEnter a peak voltage (optional) to see the average (DC-equivalent) voltage and average power for a resistive load.
- 5Verify with the worked exampleOpen the Formula and Worked Example sections to see how duty cycle, frequency, and average voltage are computed step-by-step.
Formula
Duty cycle and related quantities:
DC = (on_time / period) × 100%
DC = on_time × frequency × 100% (since f = 1/period)
off_time = period − on_time
frequency f = 1 / period
period T = 1 / f
For PWM switching between 0 and V_peak into a resistive load R:
V_avg = V_peak × (DC / 100)
P_avg = V_peak² × (DC / 100) / R
I_avg = V_avg / R = (V_peak × DC / 100) / R
Boundary cases:
DC = 0% → always off (V_avg = 0)
DC = 50% → symmetric square wave (odd harmonics only)
DC = 100% → always on (V_avg = V_peak, full power)
Worked Example
Example 1 — Arduino PWM at 1 kHz, on-time 0.25 ms:
- period = 1 / 1000 = 1 ms = 0.001 s
- DC = 0.25 / 1 = 0.25 → 25%
- Off time = 1 − 0.25 = 0.75 ms
- For V_peak = 5 V: V_avg = 5 × 0.25 = 1.25 V
- For R = 100 Ω: P_avg = 25 × 0.25 / 100 = 0.0625 W
Example 2 — 50% symmetric square wave at 60 Hz:
- period = 1 / 60 ≈ 0.01667 s = 16.67 ms
- on_time = 8.33 ms; off_time = 8.33 ms; DC = 50%
- For V_peak = 5 V: V_avg = 5 × 0.5 = 2.5 V
Example 3 — Motor controller at 20 kHz, 75% duty cycle:
- period = 1 / 20000 = 50 µs
- on_time = 0.75 × 50 = 37.5 µs; off_time = 12.5 µs
- For V_peak = 24 V (motor supply): V_avg = 24 × 0.75 = 18 V
- Motor runs at 75% of full-speed voltage.
Tips
- Duty cycle DC = (on_time / period) × 100%. Equivalently, DC = on_time × frequency × 100% (since frequency = 1/period). Both forms give the same percentage — pick whichever is more convenient for your inputs.
- For PWM dimming or motor control, the average voltage is V_avg = V_peak × (DC/100). A 5 V Arduino PWM at 25% duty cycle delivers V_avg = 1.25 V. The average power into a resistive load R is P_avg = V_peak² × (DC/100) / R.
- Typical PWM frequencies: LED dimming 200-1000 Hz (avoid visible flicker); motor control 10-20 kHz (above audible); switching power supplies 100 kHz-2 MHz (smaller inductors); Class-D audio 250-500 kHz.
- A 50% duty cycle is called a symmetric square wave — the signal is on for exactly half of each period. Symmetric square waves have only odd harmonics (1f, 3f, 5f, ...) in their Fourier series. Most digital clock signals are designed for 50% to minimize jitter and EMI.
- Switching loss in a MOSFET scales with frequency × duty cycle — at very high frequencies, switching loss dominates over conduction loss. Choose the lowest frequency that meets your ripple/EMI requirements; higher frequency allows smaller inductors but more loss.
Common Mistakes
The most common mistake is confusing duty cycle with the on-time itself. A 1 ms on-time gives 50% duty cycle at 2 ms period, but 90% duty cycle at ~1.11 ms period. Always specify the period (or frequency) when quoting a duty cycle. The second mistake is computing V_avg = V_peak × on_time (forgetting to divide by period) — that gives volts-seconds, not volts. The third is using a peak voltage for power instead of average: P_avg = V_avg² / R, not V_peak² / R — unless the duty cycle is 100%.
Frequently Asked Questions
- What is duty cycle?
- Duty cycle (DC) is the fraction of one period in which a signal or system is active. It is expressed as a percentage: DC = (on_time / period) × 100%. A signal that is on for 2 ms every 10 ms has a 20% duty cycle. A signal that is always on has 100% duty cycle; a signal that is always off has 0%. PWM (pulse-width modulation) signals are characterized by their duty cycle.
- How is duty cycle calculated?
- Duty cycle = (on_time / period) × 100%, where on_time is the duration of the active phase and period is the total time for one cycle (on + off). Equivalently, DC = on_time × frequency × 100% (since frequency = 1/period). For a 1 kHz PWM signal (period 1 ms) with 0.25 ms on-time: DC = 0.25/1 = 25%.
- What is the relationship between duty cycle and average voltage in PWM?
- For a PWM signal switching between 0 and a peak voltage V_peak, the average (DC equivalent) voltage is V_avg = V_peak × (DC/100). A 5 V PWM signal at 25% duty cycle has V_avg = 5 × 0.25 = 1.25 V. This is how motor controllers and LED dimmers work — by varying the duty cycle, they vary the average power delivered.
- What is a 50% duty cycle called?
- A 50% duty cycle is called a "square wave" or "symmetric" waveform — the signal is on for exactly half of each period. A symmetric square wave has only odd harmonics in its Fourier series (1f, 3f, 5f, ...). Most digital clock signals are designed to be 50% duty cycle to minimize jitter and electromagnetic interference (EMI).
- How does duty cycle relate to average power?
- For a resistive load driven by a PWM signal between 0 and V_peak, the average power is P_avg = V_peak² × (DC/100) / R. The factor (DC/100) appears because the load only dissipates power during the on-time. This is the basis of efficient LED dimming, motor speed control, and switching power supplies — the load sees the average power, while the switch dissipates almost nothing.
- Why use PWM instead of a variable DC voltage?
- Because PWM is far more efficient. A linear regulator wastes the unused voltage as heat in the regulator — efficiency drops with the ratio V_out/V_in. A PWM switch (transistor or MOSFET) is either fully on (low V, high I, low loss) or fully off (no I, no loss) — efficiency is typically 90-98%. PWM is the standard for LED dimming, motor control, switching power supplies, and Class-D audio amplifiers.
Duty cycle definition
Duty cycle (DC) is the fraction of one period in which a signal is active: DC = (on_time / period) × 100%. A 1 kHz PWM signal (period 1 ms) that is on for 0.25 ms has a 25% duty cycle. PWM signals are characterized by frequency (cycles per second) and duty cycle (active fraction). Digital clocks aim for 50% duty cycle; PWM controllers vary duty cycle from 0% to 100% to control average power.
Frequency and period
Frequency f is the number of cycles per second (Hz); period T = 1/f is the time for one cycle. A 1 kHz signal has period 1 ms; a 60 Hz signal has period 16.67 ms. The off-time is period − on_time. Duty cycle is sometimes expressed as on_time × frequency × 100%, which is equivalent to on_time / period × 100%. Both forms are dimensionally consistent (seconds × Hz = dimensionless).
Average voltage and power
For a PWM signal switching between 0 and a peak voltage V_peak, the average (DC-equivalent) voltage is V_avg = V_peak × (DC/100). The average power into a resistive load R is P_avg = V_peak² × (DC/100) / R. The factor (DC/100) appears because the load dissipates power only during the on-time. This is the basis of efficient PWM dimming, motor control, and switching converters.
PWM signal generation
PWM signals are generated by comparing a sawtooth or triangle carrier wave to a control signal — when the control exceeds the carrier, the output is on. Varying the control signal changes the duty cycle linearly. Most microcontrollers (Arduino, ESP32, STM32) have hardware PWM peripherals that produce 8-16 bit duty-cycle resolution at frequencies from 1 Hz to MHz. Higher frequency allows finer control but increases switching losses in the MOSFET or IGBT.
| Scenario | Duty cycle | Frequency | V_avg (V_peak=5 V) |
|---|---|---|---|
| Symmetric square wave (50% DC) | 50.00% | 1.00 Hz | 2.5000 V |
| Arduino PWM 25% (LED dim) | 25.00% | 1.00 Hz | 1.2500 V |
| Arduino PWM 75% (LED bright) | 75.00% | 1.00 Hz | 3.7500 V |
| Always on (100% DC) | 100.00% | 1.00 Hz | 5.0000 V |
| 1 kHz, 10% (rare pulse) | 10.00% | 1,000.00 Hz | 0.5000 V |
Duty cycle DC = (on_time / period) × 100%. For a PWM signal switching between 0 and V_peak, the average (DC-equivalent) voltage is V_avg = V_peak × (DC/100). The average power into a resistive load R is P_avg = V_peak² × (DC/100) / R — the (DC/100) factor accounts for the load only dissipating power during the on-time.
Typical PWM frequencies: LED dimming 200-1000 Hz (avoid visible flicker above 60 Hz at the eye's fusion threshold); motor control 10-20 kHz (above audible range); switching power supplies 100 kHz-2 MHz (smaller inductors but higher switching loss); Class-D audio 250-500 kHz. Choose the lowest frequency that meets your ripple and EMI requirements — switching loss scales with frequency.
A 50% duty cycle is not the same as 50% power. For a symmetric square wave into a resistive load, V_avg = V_peak × 0.5 and P_avg = V_peak² × 0.5 / R = 0.5 × V_peak²/R — which is 50% of the peak power, true. But for non-50% duty cycles, P_avg = V_peak² × (DC/100) / R, not V_peak² × (DC/100)² / R. The factor is linear in DC, not quadratic — because the load dissipates full power during the on-time and zero during the off-time.
Authoritative References
- Wikipedia — Duty cycle— wikipedia.orgDefinition and applications of duty cycle in electronics, including PWM, square waves, and switching regulators.
- Wikipedia — Pulse-width modulation— wikipedia.orgComprehensive overview of PWM — the most common application of duty cycle in motor control, LED dimming, and power electronics.
- Khan Academy — AC circuits— khanacademy.orgFree tutorials covering PWM, average voltage, RMS values, and switching converters with worked examples.
- NIST — Semiconductor electronics— nist.govNIST research on switching power converters, PWM measurement, and the calibration of duty-cycle meters.
Try our other free calculators
CalcGenius has 1,200+ free, ad-free, browser-based calculators for finance, health, math, science, and everyday life. No sign-up required.