Duty Cycle Calculator

Duty Cycle Calculator

Calculate the percentage of each period that a periodic signal is active, its duty factor, and pulse energy when peak power is supplied.

Duty cycle 22.50% Duty factor 0.225000 Pulse energy 4.50 J
Example workbook ready to download.

Signal inputs

Active or high time within one complete period.

Time from one cycle boundary to the next equivalent boundary.

Used only to calculate energy delivered during one pulse.

Results

Duty cycle (D)

22.50%

Percentage of the period spent in the active state.

Duty factor (df)

0.225000

The same ratio expressed from 0 to 1.

Pulse energy (E)

4.50 J

Peak power × pulse width when peak power is provided.

Current calculation: D = 0.225 s ÷ 1 s × 100% = 22.50%.
Duty cycle 22.50 percent. Duty factor 0.225000. Pulse energy 4.50 joules.

How to use this duty cycle calculator

What this calculator does

This calculator measures how much of one repeating cycle is spent in the active, high, or “on” state. It converts pulse width and total period to a duty cycle percentage and a duty factor. When you also provide peak power, it calculates pulse energy for an idealized rectangular pulse by multiplying peak power by pulse width. It is a timing and energy identity calculator: it does not model rise time, fall time, pulse shape, switching losses, thermal limits, device-specific safe operating areas, or whether a particular circuit can physically sustain the entered conditions.

For digital timing, a period is measured between equivalent edges and duty cycle is the fraction of that period spent high. This matches the terminology used in NI's digital timing guide.

When to use it

  • Check a PWM timing setup before programming a timer, LED dimmer, motor controller, valve, or pump.
  • Convert measured oscilloscope pulse width and period into a duty-cycle percentage.
  • Compare two periodic signals that have different time units but the same on-time ratio.
  • Estimate energy per rectangular pulse when a known peak power can reasonably be treated as constant over the pulse width.

How to calculate

  1. The calculator opens with a complete demonstration: 225 ms pulse width, 1 s period, and 20 W peak power. The first result is ready immediately, and the example Excel workbook is available without extra input.
  2. Replace Pulse width (PW) with your active time and choose its time unit. Replace Period (T) with the duration of one complete repeating cycle and choose its time unit. Unit changes convert the current value so the physical time remains the same.
  3. Optionally replace Peak power (Pp) and its power unit if you want Pulse energy (E). Leave peak power blank when you only need the timing ratio.
  4. Read Duty cycle (D) and Duty factor (df). Pulse width may not exceed the period. The calculator updates live and rejects malformed values rather than silently treating them as zero.
  5. Select Download Excel to create a current-state workbook. Reset clears the demonstration values and computed results; after Reset, Excel export is disabled until the required timing inputs form a complete valid state again.

Input guide

Pulse width (PW) is a required nonnegative decimal time. Accepted input uses a decimal point, such as 225 with ms, 0.225 with s, or 225000 with µs. It must not exceed the period. Increasing pulse width while keeping period fixed increases both duty cycle and duty factor; if peak power is present, it also increases pulse energy. A common mistake is mixing time units mentally; the unit selector prevents that by converting the entered value when the unit changes.

Pulse width unit accepts ns, µs, ms, or s. It is required because the ratio is only meaningful after the two time quantities are converted to the same base unit. The NIST definition of the SI second provides the underlying reference unit used for these conversions.

Period (T) is a required positive decimal time. For example, 1 s means the waveform repeats once each second. A larger period with fixed pulse width lowers duty cycle. Zero is invalid because duty cycle would require division by zero. Do not substitute frequency directly into this field; period is time, while frequency is the reciprocal of period.

Period unit uses the same four time choices as pulse width. If a measurement is 10 ms, entering 10 and selecting ms is equivalent to entering 0.01 and selecting s. Changing the selector converts the current period value so the modeled cycle duration is preserved.

Peak power (Pp) is optional and accepts a nonnegative decimal. The demonstration uses 20 W. Higher peak power does not change duty cycle; it only raises pulse energy in direct proportion. The rectangular-pulse assumption is important: real pulses with sloped or shaped power profiles require integration of power over time rather than a simple peak-power multiplication.

Peak power unit accepts mW, W, or kW. Changing units converts the current number while preserving physical power. Use the same physical peak power you would quote for the active portion of the pulse, not average power over the entire period.

Output guide

Duty cycle (D) is a percentage from 0% to 100% for the supported timing model. Zero means no active time; 100% means the pulse width equals the whole period. It is an exact ratio of the entered times after unit conversion, not a hardware recommendation. Duty factor (df) is the identical quantity expressed as a unitless fraction from 0 to 1; 22.50% equals 0.225000. NI describes PWM as using duty cycle together with frequency to characterize a pulse train in its PWM measurement and generation overview.

Pulse energy (E) is reported in joules when peak power is present. It is driven by peak power and pulse width, not by period directly. A zero peak power or zero pulse width gives zero joules. When peak power is omitted, the calculator states that pulse energy needs peak power rather than inventing a value.

Worked example

The startup example uses a pulse width of 225 ms and a period of 1 s. Converting 225 ms to seconds gives 0.225 s. The duty factor is therefore 0.225 ÷ 1 = 0.225000, and multiplying by 100 gives a 22.50% duty cycle. With the example peak power of 20 W, pulse energy is 20 W × 0.225 s = 4.50 J. These are the exact values shown on first open and written to the downloadable workbook.

Formula, interpretation, and common mistakes

The core relationship is D = PW ÷ T × 100%, while the duty factor is df = PW ÷ T. Because pulse width and period are both times, their units cancel after conversion to a common unit. This is why a 2 ms pulse in a 10 ms period and a 0.2 s pulse in a 1 s period both produce 20% duty cycle.

Duty cycle is especially common in pulse-width modulation. In an ideal two-level PWM signal, changing the active fraction changes the time-average level while the high-state amplitude can remain fixed. The exact relationship between duty cycle and useful output depends on the load and the system: motor speed, perceived LED brightness, heating, acoustic output, and converted electrical power can all be nonlinear in real equipment. Use this calculator for the timing ratio itself, then apply the component or system datasheet for operating limits.

Do not confuse period with pulse width. The period includes both active and inactive time. Also avoid entering frequency into a time field: if frequency is 1 kHz, the corresponding period is 1 ms. Another common error is assuming a low duty cycle automatically makes a peak-power condition safe. Thermal behavior depends on pulse repetition, cooling, transient impedance, ambient conditions, and manufacturer limits.

Practical check: if pulse width is greater than period, the timing description is internally inconsistent for a single active interval per cycle. Correct the inputs rather than clipping the result to 100%.