PWM Duty Cycle Calculator

Enter any two timing values (Ton/Toff/Period/Frequency) to solve duty cycle and the missing timing. Includes unit conversions and Show Work.

How to Use

  1. Enter known values (Ton, Toff, Period, Frequency, or Duty %).
  2. Pick the correct units (µs, ms, s, Hz, kHz).
  3. Use “Solve For” if you want to force a specific output.
  4. Open “Show Work” for formulas and steps in base units.
PWM Lab View
Visual feedback: duty % and timing (Ton/Toff).
Duty
Ton
Toff
Freq
Status:
Waveform scales with duty (high time) and frequency (animation speed). 0 t HIGH LOW Ton Toff
Inputs & Settings
Enter what you know. Results update instantly.
Duty = Ton / Period × 100
Period T = 1 / f
Period = Ton + Toff
Ton = Duty × Period
Toff = Period − Ton
If set, shows nearest duty step (e.g., 8-bit = 255 or 256).

Show Work (step-by-step)
Work is shown in base units (seconds, Hz, and %) for clarity and consistency.

PWM Formulas

Duty cycle: D(%) = (Ton / T) × 100

  • Period from frequency: T = 1 / f
  • Ton from duty: Ton = (D / 100) × T
  • Toff: Toff = T − Ton
  • Duty from Ton/Toff: D(%) = Ton / (Ton + Toff) × 100
Where T is period, f is frequency, Ton is on-time, and Toff is off-time.

FAQ

What is PWM duty cycle?

Duty cycle is the percentage of one period where the signal is HIGH (on-time).

Does duty cycle change the frequency?

No. Duty changes HIGH vs LOW time within a period. Frequency is how often the period repeats.

Why do my calculations look wrong at very high frequencies?

At high frequencies, resolution limits (timer steps / clock) can force duty to round to the nearest step.

Tool Info

Last updated:

Updates may include UI improvements, unit support, and calculation edge-case handling.