Advertisement
Advertisement
PHYSICS

Duty Cycle Calculator — on-time, period, frequency and PWM average

Solve duty cycle, pulse width, off-time, period and frequency from any two of them, and get the average and RMS output of a switched supply at that duty.

Any two of the five quantities fix the other three. Pick the pair you actually measured; the rest are derived, not assumed.
Read only in frequency-and-duty mode. A duty cycle is a ratio of times, so it has no unit of its own and cannot exceed 100 per cent.
Optional. Used for the average and RMS figures, which are what a PWM signal delivers to a load. Set it to 0 if you only want the timing.
Duty cycle
 
 
0
Period
0
Frequency
0
Off-time
0
Average output voltage
On
0%
Off
0%
Tip: average voltage scales with duty cycle, but power into a resistive load scales with duty cycle directly and RMS voltage with its square root. Half duty does not mean half the heating and it does not mean half the voltage.
Advertisement

A duty cycle is the fraction of one full cycle that a repeating signal spends in its active state, usually written as a percentage. A square wave that is high for two milliseconds and low for eight has a period of ten milliseconds and a duty cycle of twenty per cent. That is the entire definition, and it holds whether the signal is driving a motor, dimming an LED, positioning a servo, or clocking a switching regulator.

What this calculator adds is the rest of the relationships. Duty cycle, pulse width, off-time, period and frequency are five quantities bound by two equations, so any two of them fix the other three. Arb Digital built this page to solve in whichever direction you need, and to carry the result through to what a PWM signal actually delivers into a load — the average voltage, the RMS voltage, and why those two are not the same number.

What This Duty Cycle Calculator Does

Pick the pair you know. On-time and off-time is the pair you get from a scope cursor. Frequency and duty cycle is the pair you get from a datasheet or a microcontroller register. Period and on-time is the pair you get from a timing diagram. In every mode the tool returns the other three quantities, keeping the time unit you selected for the inputs but choosing a sensible unit for each output on its own.

The supporting grid gives period, frequency, off-time and the average output voltage of a supply switched at that duty. The two bars show the on and off fractions to scale, which is a faster sanity check than reading percentages. The note under them carries the RMS voltage and the power fraction, because those are the numbers that decide whether a component gets hot.

Duty cycle has no unit. It is a ratio of one time to another, so the seconds cancel. That is why you can quote it as a percentage, as a fraction, or as an eight-bit register value from 0 to 255 without converting anything — they are three notations for the same dimensionless number.

How to Use It

  1. Select the mode that matches your measurement. Entering values into fields the current mode does not read will change nothing, which is deliberate — the tool never mixes an assumed value with a measured one.
  2. Set the time unit before typing. Microcontroller PWM lives in microseconds, mains-frequency control in milliseconds, and switching regulators in nanoseconds — all of them traceable to the second maintained by the NIST Time and Frequency Division. The selector applies to on-time, off-time and period together.
  3. Use the frequency unit selector for fast signals. Typing 20 with kilohertz selected is less error-prone than typing 20000, and the tool converts to hertz internally either way.
  4. Enter a supply voltage if you care about the load. The average and RMS figures only mean something once there is a voltage being switched. Leave it at zero for a pure timing problem.
  5. Check the bars against your expectation. If the on bar looks nothing like the fraction you had in mind, the usual cause is a time unit left on the wrong setting.

The Formula: Two Equations Behind Five Quantities

The first is the definition: D = ton ÷ T, where T is the period. The second is the relation between period and frequency: f = 1 ÷ T. Everything else follows. Off-time is Tton. On-time from duty and frequency is D ÷ f. Period from on-time and duty is ton ÷ D. The hertz is defined as one reciprocal second in the BIPM SI Brochure, which is why frequency and period are exact reciprocals with no constant of proportionality anywhere.

Work the defaults. On-time 2 ms, off-time 8 ms. The period is 2 + 8 = 10 ms, so the frequency is 1 ÷ 0.010 = 100 Hz. The duty cycle is 2 ÷ 10 = 0.20, or 20 per cent. Switching a 12 V supply at that duty gives an average of 12 × 0.20 = 2.40 V.

The RMS value is a different calculation and a different answer. For a rectangular pulse train between 0 and V, the RMS voltage is V × √D, which here is 12 × √0.20 = 5.37 V. That is more than twice the average. Power into a resistive load goes as the square of RMS voltage, so it is V2D ÷ R — proportional to duty cycle, not to its square root and not to the average voltage squared. Getting this wrong is the standard way to underestimate how hot a PWM-driven resistive load will run.

Advertisement

Average, RMS and Power Are Three Different Answers

Three numbers describe the same PWM waveform and they are routinely confused. The average, or DC, value is what a voltmeter on a slow setting reads and what a motor's mechanical inertia responds to: V × D. The RMS value is what determines heating in a resistor: V × √D. The delivered power is V2D ÷ R, which is the full-on power multiplied by the duty cycle.

At 20 per cent duty on a 12 V supply those give 2.4 V, 5.37 V and one fifth of full power. A designer who takes the 2.4 V average and computes 2.42 ÷ R gets four per cent of full power instead of twenty, understating the heat by a factor of five. The average is not a substitute for the RMS in any power calculation.

Which one is relevant depends entirely on what the load does with the ripple. A DC motor with significant rotational inertia and winding inductance smooths the pulses and behaves close to the average. A bare resistive heater does not smooth anything and follows the RMS. An LED is neither: its brightness follows the average current reasonably well because the eye integrates, but its forward voltage does not scale with duty at all, which is why LED dimming is done with current-controlled PWM rather than by lowering the supply.

Where This Sits Next to Our 555 Timer Calculator

Arb Digital already publishes an NE555 timer calculator, and the boundary between the two pages is worth stating clearly. That page starts from component values — two resistors and a capacitor — and derives the frequency and duty cycle a specific integrated circuit will produce in astable mode. It is a circuit design tool tied to one chip's internal thresholds. This page starts from the timing itself and works between the five timing quantities, whatever produced them. If you are choosing resistors, use the 555 page. If you have a waveform and want to characterise it, use this one.

The same distinction applies to the frequency period calculator, which handles the reciprocal relation between frequency and period alone. This page includes that relation but adds the on-time and duty dimension that a plain reciprocal cannot express. And the frequency converter only rescales units, moving hertz to kilohertz without deriving anything new.

Duty Cycle Beyond PWM

The term travels well outside electronics and the arithmetic does not change. A radar transmitter has a duty cycle: the ratio of pulse width to pulse repetition interval, which is often well under one per cent and directly sets the average transmitted power against a much higher peak power. A welding machine has a duty cycle, quoted as the fraction of a ten-minute window it can run at rated current before thermal limits force a rest. An air compressor has one. A relay coil driven intermittently has one.

In every case the same insight applies: a low duty cycle lets a device operate at a peak level it could never sustain continuously, because the average dissipation is what the thermal design has to survive. That is why a radar can radiate a megawatt peak from a transmitter rated at a few kilowatts average, and it is why the duty cycle number on a welder's specification plate matters more than its current rating.

The one place the definition gets slippery is where the signal is not rectangular. Duty cycle is defined for a two-state waveform. For a sine wave or any continuously varying signal the concept does not apply, and quoting a duty cycle for one is a category error — the right quantities there are RMS and crest factor, which the RMS voltage calculator handles.

Need a website that loads fast and actually works?

Arb Digital builds free tools like this one because useful pages earn attention. If you want tools, calculators or content built for your own audience, we can help.

Browse All Free Tools Talk to Arb Digital

Common Mistakes to Avoid

  • Using the average voltage in a power calculation — power follows the RMS value. Squaring the average understates the delivered power, badly at low duty cycles.
  • Leaving the time unit on the wrong setting — duty cycle is a ratio and survives it, but period and frequency do not. A microsecond entered as a millisecond moves the frequency by a factor of a thousand.
  • Quoting a duty cycle above 100 per cent — on-time cannot exceed the period. A value above 100 means the on-time and period were taken from different measurements.
  • Assuming duty cycle sets speed on a loaded motor — it sets the average voltage. Actual speed depends on load torque, back-EMF and losses, and falls short of the linear relation under load.
  • Applying duty cycle to a non-rectangular waveform — the definition needs two states. For sine or ramp signals, use RMS and crest factor instead.

Related Free Tools From Arb Digital

For designing a 555 astable from resistor and capacitor values, use the NE555 timer calculator. The frequency period calculator covers the reciprocal relation on its own, and the frequency converter handles unit rescaling. For the electrical side of a switched load, the RMS voltage calculator, the power dissipation calculator and the Ohm's law calculator take the timing result through to current and heat. Timing set by an RC network is covered by the RC time constant calculator. The complete free online tools hub lists everything Arb Digital publishes.

Frequently Asked Questions

How do I calculate duty cycle?

Divide the on-time by the period and multiply by 100 for a percentage. A pulse that is high for 2 milliseconds within a 10 millisecond period has a duty cycle of 20 per cent. The period is the on-time plus the off-time, so you can also compute it directly from those two figures.

Does duty cycle have a unit?

No. It is a ratio of one time to another, so the units cancel and the result is dimensionless. It can be written as a percentage, as a decimal fraction, or as an integer register value in a microcontroller, and all three describe the same quantity.

What is the difference between average and RMS voltage in PWM?

Average voltage is the supply voltage multiplied by the duty cycle, and it is what a slow meter reads. RMS voltage is the supply multiplied by the square root of the duty cycle, and it is what determines heating in a resistive load. At 20 per cent duty on 12 volts they are 2.4 volts and 5.37 volts respectively.

How does duty cycle relate to delivered power?

For a resistive load, delivered power is the full-on power multiplied by the duty cycle. Half duty gives half the power, not a quarter and not half the voltage. This follows from the RMS relation, since power goes as RMS voltage squared and RMS goes as the square root of duty.

How is this different from the 555 timer calculator on this site?

The 555 page starts from two resistors and a capacitor and derives what that specific chip will output in astable mode. This page works purely with the timing quantities themselves, in any direction, regardless of what circuit generated them. One is a component design tool, the other characterises a waveform.

Can duty cycle be higher than 100 per cent?

No. The on-time is part of the period, so the ratio cannot exceed one. A calculated value above 100 per cent means the on-time and the period came from different measurements or were entered in different units.

Does duty cycle apply to a sine wave?

Not meaningfully. The definition requires a signal with two distinct states, on and off. A sine wave varies continuously, so it has no on-time to measure. RMS value and crest factor are the correct descriptors for continuously varying waveforms.

This tool is provided for educational and study use. It computes idealised timing and waveform relationships and does not account for switching transitions, rise and fall times, dead time, or the thermal limits of any specific component.

Advertisement
Advertisement

Take it further