Duty Cycle & PWM Calculator
Calculate Smarter. Work Faster.
Free duty cycle and PWM calculator — find duty cycle, duty factor, frequency and pulse energy from pulse width & period/frequency, or from average & peak power. Or go the other way: enter a duty cycle percentage to get the average PWM output voltage, period, and ON/OFF time directly.
Duty Cycle Details
Find duty cycle from timing or power values — or enter a duty cycle % directly to get average voltage.
If known, also gives peak power and pulse energy.
If known, estimates the average PWM output voltage (LED dimming, motor speed, buck converter).
dBm is supported for RF/radar power (referenced to 1 mW) and can be negative — e.g. −10 dBm ≈ 0.1 mW.
If known, also gives period, pulse width and pulse energy.
Used for the ideal average PWM voltage, Vavg ≈ (D÷100) × Vin for an ideal 0-to-Vin waveform — the direction motor-speed and actuator-PWM setups usually need.
This calculator treats the signal as an ideal repeating on/off pulse. The optional ideal average PWM voltage (Vavg ≈ D × Vin for an ideal 0-to-Vin waveform) is not a guaranteed actual load voltage — a lossless switch with no diode drop, dead-time, or ripple is assumed, and real PWM circuits will differ somewhat from this ideal figure.
Note: this computes waveform/periodic duty cycle (PW ÷ T) from timing or power inputs. A manufacturer's equipment duty-cycle rating (e.g. a welder or compressor) is a separate thermal/operating specification and should be checked against the manufacturer's own stated time window rather than read off this calculator.
Enter values and hit calculate
General reference calculation — not a substitute for your device's rated duty cycle or a full switching-loss analysis.
Enter values above to see a breakdown.
How Duty Cycle Is Calculated
A periodic signal — a square wave, a PWM drive signal, a pulsed radar transmission, an intermittently-running compressor — repeats itself every fixed interval, the period. Within each period, the signal is "on" for some portion of the time and "off" for the rest. Duty cycle simply measures what fraction of that period is spent on, regardless of how intense the "on" state actually is.
One full period T contains one on-time (Pulse Width, PW) and one off-time. Duty cycle is PW divided by T.
Choosing a PWM switching frequency: the switching frequency (how fast the on/off cycle repeats) is a separate design decision from duty cycle, and picking it involves real trade-offs. Too low, and an LED driven by PWM can visibly flicker, or a motor can audibly whine or vibrate as it responds to individual pulses rather than a smooth average; many LED dimmers therefore switch well above roughly 200–500 Hz (often into the low kHz range) specifically to stay above the range of visible flicker and audible motor noise. Too high, and switching losses in the driving transistor rise (each on/off transition itself dissipates a small amount of energy, and more transitions per second means more of this loss), while the drive electronics also need to be fast enough to produce clean edges at that rate. Typical PWM switching frequencies range from a few hundred hertz for basic heater or valve control, through the low kilohertz range for LED dimming and small motor drives, up to tens or hundreds of kilohertz for switch-mode power supplies and motor drives using MOSFETs, where minimizing inductor/capacitor size favors a higher frequency.
Resolution — how finely duty cycle can actually be set: a microcontroller's PWM output isn't continuously variable; it's stepped, because duty cycle is set as a count of timer ticks out of a fixed total (for example, an 8-bit PWM timer can only represent 256 distinct duty-cycle steps, giving roughly 0.39% resolution per step). A higher-resolution timer (10-bit, 16-bit) allows finer duty-cycle steps, which matters for applications like precise motor speed control or smooth LED dimming curves where a visible "stepping" between adjacent brightness or speed levels would otherwise be noticeable. Resolution and maximum achievable switching frequency are often linked for a given timer clock speed — requesting a higher PWM frequency from the same timer clock typically reduces the number of achievable duty-cycle steps, and vice versa.
Duty Cycle Formula (From Time)
D (%) = (PW ÷ T) × 100%, where PW is the pulse width (on-time within one cycle) and T is the period (total time of one complete cycle). Expressed as a plain ratio rather than a percentage, this same value is the duty factor: df = PW ÷ T. Since period and frequency are reciprocals (T = 1 ÷ f), duty cycle can equally be written as D (%) = PW × f × 100%, with PW in seconds and f in hertz.
Duty Cycle Formula (From Power)
D (%) = (P̄ ÷ Pp) × 100%, where P̄ is the average power over a full period and Pp is the peak (pulse) power. This form is especially useful when the underlying pulse timing isn't directly measurable but average and peak power readings are — a common situation in pulsed RF, radar, and laser systems. It follows directly from the time-based definition, since average power is just the peak power scaled down by the same fraction of time the signal is actually on.
Pulse energy: once both a power value and a timing value are known, the energy delivered in a single on-pulse can be found from Ep = Pp × PW, or equivalently Ep = P̄ × T — the two expressions give the same answer because P̄ = D × Pp and T = PW ÷ D cancel out identically.
Worked example (time-based): an NE555-style oscillator produces a period of T = 1 s, with the output high for PW = 225 ms = 0.225 s. Duty cycle D = (0.225 ÷ 1) × 100% = 22.5%, duty factor df = 0.225, and the equivalent frequency is f = 1 ÷ T = 1 Hz.
Worked example (power-based): a pulsed radar transmitter is on for 10 ms out of every 1000 ms (1 s), giving D = 1%. If its peak transmit power is 20 kW, the average power over that period is P̄ = D × Pp = 0.01 × 20,000 W = 200 W, and the energy per pulse is Ep = 20,000 W × 0.010 s = 200 J.
Solving in reverse — from a target duty cycle to average voltage: the most common real-world question isn't always "what's my duty cycle" but the opposite: "I want to run this motor/actuator at a given duty cycle at a given switching frequency — what average voltage and ON/OFF timing does that actually give me?" This calculator's "D% → Voltage" mode handles that direction directly: enter the desired duty cycle, the switching frequency (or period), and the supply voltage, and get period, ON time, OFF time and Vavg ≈ (D÷100) × Vin back out. Worked example: a 24 V linear actuator driven at 75% duty cycle, 1 kHz switching — period T = 1÷1000 = 1 ms, ON time = 0.75 × 1 ms = 0.75 ms, OFF time = 0.25 ms, and Vavg = 0.75 × 24 V = 18 V. Halving the duty cycle to 37.5% would roughly halve the average voltage the actuator sees, which is the basic mechanism behind PWM speed control.
Why time units matter: pulse width and period must be converted to the same time base before dividing — mixing milliseconds with seconds without converting first is one of the most common sources of a wrong duty-cycle result. This calculator converts every time and frequency entry internally to a common base (seconds and hertz) before computing, regardless of which units you type each value in.
Choosing period vs. frequency as an input: some datasheets and oscilloscope readouts quote period directly; others quote frequency. Both describe the same underlying timing, so this calculator accepts either — enter whichever one your source data actually gives you, and the other is derived automatically (T = 1 ÷ f).
Worked Example
PW = 225 ms, T = 1 s: D = (0.225 ÷ 1) × 100% = 22.5%, duty factor = 0.225, f = 1 Hz.
This calculator uses the standard idealized duty-cycle definitions above. For devices with a manufacturer-rated maximum duty cycle (welders, compressors, pulsed RF sources), always check the rated value and its stated time window rather than relying on a general-purpose calculation alone.
PWM in Practice
Pulse Width Modulation (PWM) uses a rapidly switching signal, with a controllably varying duty cycle, to deliver a desired average power or voltage to a load far more efficiently than a linear (resistive) control method — because the switching device itself is either fully on (low loss) or fully off (no current), rather than sitting in a lossy partially-conducting state.
| Application | Role of Duty Cycle |
|---|---|
| LED dimming | Higher duty cycle → brighter perceived output (Vavg ≈ D × Vin) |
| DC motor speed control | Higher duty cycle generally increases average applied voltage, which can increase speed under comparable load conditions |
| Buck (step-down) converter | Ideal CCM approximation: Vout ≈ D × Vin (actual output also depends on operating mode, losses and control loop) |
| VFD / inverter (SPWM) | Duty cycle varied continuously each switching cycle to synthesize an AC sine wave |
| Pulsed radar / RF | Low duty cycle keeps average transmitted/dissipated power manageable despite high peak power |
| Welders, compressors | Rated maximum duty cycle limits continuous heat build-up in the device |
| Automotive fuel injectors | ECU varies injector-open duty cycle each engine cycle to meter fuel quantity |
PWM to approximate a sine wave: if the duty cycle of a fast switching signal is varied smoothly, cycle by cycle, so that its average value traces a sinusoid, the result approximates a sine wave using nothing but an on/off switch — this Sinusoidal PWM (SPWM) technique underlies most modern variable frequency drives and inverters. A shorter switching period (higher switching frequency) relative to the target output frequency generally gives a closer sinusoidal approximation with less unwanted harmonic content, at the cost of higher switching losses in the power devices — see this site's Harmonic Distortion Calculator and VFD Sizing Calculator for related tools.
PWM vs. SPWM vs. Duty Cycle — How the Three Terms Relate
These three terms get mixed up often because they describe different layers of the same idea rather than three competing techniques. Duty cycle is a single number; PWM and SPWM are two different strategies for deciding how that number changes over time.
| Term | What It Actually Is | Typical Use |
|---|---|---|
| Duty Cycle | A single ratio — PW ÷ T — that describes how much of one period a pulse is on. It's a number, not a technique. | The parameter that PWM and SPWM both manipulate to get a result. |
| PWM (general) | Controls the average output by varying pulse width (duty cycle) relative to a switching period. | DC motor speed control, LED brightness, buck/boost converter output regulation. |
| SPWM | A PWM variant that recalculates duty cycle at every switching interval — usually by comparing a sine reference against a triangular carrier — so the running average traces a sine wave. | Inverters and AC motor drives (VFDs), where a DC bus has to be turned into synthetic AC. |
Put another way: a basic PWM dimmer circuit picks one duty cycle (say 60%) and holds it there until the user changes the brightness setting — the output stays a steady DC-like average. An SPWM-driven inverter, by contrast, is recomputing its duty cycle continuously, often thousands of times per output cycle, deliberately sweeping it up and down so the resulting average traces the shape of a 50 or 60 Hz sine wave. The switching itself still happens exactly the way it does in ordinary PWM — on, off, on, off — SPWM is simply a particular pattern of duty-cycle values applied to that same underlying mechanism, not a separate kind of switch.
Wherever the sine reference sits above the triangular carrier, the output switches on — so pulses widen near the sine's peak and narrow near its zero-crossing, tracing the sine wave in the pulses' running average.
The ideal average PWM voltage, and its limits: Vavg ≈ D × Vin describes the average value of an ideal 0-to-Vin switched waveform — it is not automatically the actual voltage a real load sees. It assumes a lossless switch with instant transitions and no forward voltage drop. Real circuits have switching dead-time, diode or MOSFET voltage drops, and output ripple that a simple low-pass filter (or the load's own inertia, for a motor) only partially smooths — so measured average voltage is typically somewhat below this ideal figure, more noticeably at low duty cycles or high switching frequencies.
A non-electrical example — automotive fuel injectors: duty cycle isn't limited to voltage/current outputs. In a port-injected engine, the ECU pulses each injector open at a fixed frequency (tied to engine speed) and varies the duty cycle to control injector on-time. A higher injector duty cycle generally means a longer on-time and greater fuel delivery per engine cycle, assuming fuel pressure and injector flow characteristics stay comparable — but the resulting air-fuel ratio isn't set by duty cycle alone; it also depends on airflow, fuel pressure, injector flow rate, and the ECU's own closed-loop correction. Because the injector needs a minimum open time to fully lift off its seat and a margin below 100% to stay responsive to further demand, a commonly used tuning guideline is to avoid sustained injector duty cycles approaching the upper 80% range — though the appropriate limit depends on the specific injector, fuel pressure, and control system, rather than being a universal threshold.
Common Mistakes When Working With Duty Cycle
1. Treating duty factor and duty cycle as different quantities. They are the same ratio — duty factor is simply duty cycle expressed as a decimal (0 to 1) instead of a percentage. Confusing the two commonly leads to a value that's off by a factor of 100.
2. Mixing time units before dividing. Entering pulse width in milliseconds and period in seconds without converting both to the same base first silently produces a duty cycle that's off by orders of magnitude — always convert to a common unit (or let the calculator do it) before computing PW ÷ T.
3. Entering a pulse width greater than the period. A valid PWM signal cannot be "on" for longer than one full cycle — if PW exceeds T, the parameters describe an impossible signal and should be rechecked rather than accepted as a duty cycle above 100%.
4. Treating Vavg = D × Vin as the actual load voltage rather than an ideal-waveform average. This formula gives the average of an ideal, lossless 0-to-Vin switched waveform — actual buck converters, motor drives, and LED dimmers have switching losses, semiconductor voltage drops, and ripple that make the measured average somewhat different from this ideal figure, particularly at low duty cycles.
5. Confusing average power with peak power in a pulsed system. A radar or laser system's headline "power" rating is often peak power, which can be many times the actual average power the system dissipates or radiates continuously — using peak power where average power is required (for thermal or energy-cost calculations) significantly overstates the real figure.
6. Ignoring a device's rated maximum duty cycle. A welder or compressor rated for, say, 60% duty cycle over a 10-minute window is not rated for continuous 100% operation — running it beyond that rating for sustained periods risks thermal damage or a protection cutout, even if each individual "on" period seems short.
7. Forgetting that pulse energy needs both a power value and a timing value. Ep = Pp × PW (or P̄ × T) cannot be found from power alone, or from timing alone — at least one power quantity and one timing quantity (period, frequency, or pulse width) must both be known.
8. Confusing PWM switching frequency with any other frequency in the same system. A motor's electrical PWM switching frequency (say 16 kHz) has no direct relationship to its mechanical rotation speed, and an inverter's SPWM carrier frequency is not the same as its synthesized output frequency (typically 50/60 Hz) — treating these as interchangeable when reading a datasheet or nameplate is a common source of confusion.
9. Assuming any duty cycle is achievable on real hardware. Practical PWM drivers, relays, and gate drivers have minimum pulse-width and minimum dead-time limitations — a requested duty cycle translating to a pulse width shorter than the hardware can reliably produce (or a gap shorter than a mechanical relay can physically open/close within) may simply not be achieved as calculated, even though the arithmetic itself is valid.
Frequently Asked Questions
What is duty cycle, and how is it different from duty factor? +
Duty cycle is the fraction of one full period that a repeating signal spends in its "on" (active/high) state, expressed as a percentage: D = (PW / T) × 100%. Duty factor is the same ratio expressed as a plain decimal fraction: df = PW / T. A 25% duty cycle and a duty factor of 0.25 describe the identical signal — only the presentation differs.
What is the formula for duty cycle from pulse width and period? +
D (%) = (PW / T) × 100%, where PW is the pulse width and T is the period, both in the same time unit. Since T = 1 / f, an equivalent form is D (%) = PW × f × 100%, with PW in seconds and f in hertz.
How do I calculate duty cycle from average and peak power? +
D (%) = (average power ÷ peak power) × 100%. This holds because average power is simply the peak power scaled down by the fraction of time the pulse is actually on — it's commonly used in pulsed RF, radar, and laser systems where average power is measured but pulse timing may not be directly accessible.
How does duty cycle relate to frequency? +
Frequency and period are reciprocals: f = 1/T and T = 1/f. Duty cycle itself doesn't change with frequency for a fixed PW/T ratio — doubling frequency at the same duty cycle means the pulse width also halves, since a shorter period needs a proportionally shorter on-time to keep the same ratio.
What is pulse energy, and how is it calculated? +
Pulse energy is the energy delivered during one on-pulse: Ep = Pp × PW, or equivalently Ep = P̄ × T. This calculator computes it whenever both a power value and a timing value (period, frequency, or pulse width) are available.
How does duty cycle affect average output voltage in PWM applications like LED dimming or motor speed control? +
For an ideal 0-to-Vin PWM waveform, the ideal average voltage is Vavg ≈ D × Vin, where D is the duty factor (0 to 1). At 30% duty cycle on a 12 V supply, Vavg ≈ 3.6 V. This is the basic principle behind PWM LED dimming, DC motor speed control, and the step-down ratio in a buck converter — but it describes the ideal switched waveform, not automatically the actual load voltage: real circuits read somewhat differently due to switching losses and voltage drops.
What does a 100% duty cycle mean? +
A 100% duty cycle means the signal itself is continuously on for the entire period — effectively constant (DC) rather than pulsed, since no "off" portion remains. A device’s manufacturer-specified "100% duty-cycle rating" is a related but separate concept — a specific operating/thermal rating set by that manufacturer, not a guarantee of unlimited continuous operation under every load or environmental condition. Always check the manufacturer’s own duty-cycle spec for the actual limits.
Why do devices like compressors, welders, and radar transmitters specify a maximum duty cycle rating? +
These devices generate significant heat while active, and a maximum duty cycle rating specifies the largest fraction of a defined time window (often per 10 minutes) they can run before needing an off/cooling period. Exceeding the rated duty cycle for sustained periods risks thermal damage or a protection cutout — always check the manufacturer's rating and its time window.
Can duty cycle / PWM be used to approximate a sine wave? +
Yes — this is Sinusoidal PWM (SPWM), used in VFDs and inverters. Continuously varying the duty cycle of a fast switching signal so its average traces a sine wave lets an inverter synthesize approximately sinusoidal AC output from a DC source. A higher switching frequency relative to the output frequency generally gives a smoother approximation with lower harmonic content, at the cost of higher switching losses.
What is the actual difference between PWM, SPWM, and duty cycle? +
Duty cycle is a single ratio (PW ÷ T) describing how much of one period a pulse is on — it's a number, not a technique. PWM is a general switching scheme that sets a duty cycle to control one steady average output (motor speed, LED brightness). SPWM is a PWM variant that recalculates duty cycle at every switching interval, typically against a triangular carrier, so the running average traces a sine wave — the basis for inverters and AC motor drives. In short: duty cycle is the parameter; PWM and SPWM are two different strategies for varying it over time.
Explore More Categories
Electrical Calculators
Cable size, transformer size, motor current, DG size, solar sizing & more.
Browse all →Mechanical Calculators
Belt length, bearing life, cooling tower efficiency & more.
Browse all →Financial Calculators
EPF, PPF, SIP, gratuity, income tax, CAGR & more.
Browse all →Blog & Guides
Maintenance guides & engineering articles.
Browse all →