audio pulse width calculator
Audio Pulse Width Calculator guide
Translate a pulse frequency and duty-cycle percentage into high-state and low-state durations. The result describes timing for an ideal periodic two-level waveform and uses microseconds for the displayed intervals.
Play the instrument ↑- Calculation model
- Period T in microseconds = 1,000,000/frequency in Hz.
Formula and input units
Period T in microseconds = 1,000,000/frequency in Hz. High time = T × duty/100. Low time = T × (1 − duty/100). Duty cycle describes the fraction of the period spent in the designated high state, with a supported range from zero through one hundred percent.
Worked examples
At 1,000 Hz and 25 percent duty, period is 1,000 µs, high time is 250 µs and low time is 750 µs. Increasing duty to 50 percent keeps the same period and gives equal 500 µs high and low intervals.
At 2,000 Hz and 25 percent duty, the period halves to 500 µs, with 125 µs high and 375 µs low. Doubling frequency halves both intervals when the duty fraction stays fixed. Changing duty redistributes the period without changing the frequency entered in the form.
Using the result
Identify which waveform level is called high before comparing a timing measurement. Inverting a two-level pulse exchanges its high and low intervals. A 25-percent pulse therefore becomes a 75-percent high-state pulse after logical inversion, assuming the same period and ideal two-level convention.
For an audio synthesizer pulse-width parameter, check how the instrument defines its scale. Some controls expose a bipolar modulation amount or a restricted range rather than literal percent high time. Convert the documented parameter to a duty fraction before using this timing equation, then retain the frequency and parameter convention together.
Checks and comparisons
Validate that high time plus low time equals the displayed period. At 20 Hz, period is 50,000 µs. With 10-percent duty, high time is 5,000 µs and low time is 45,000 µs. At the same frequency with 90-percent duty, those two times exchange positions.
The endpoint cases have a useful interpretation. Zero duty gives no high-state interval, while one hundred percent duty gives no low-state interval. They represent constant-level limits of the ideal timing model and do not imply a changing audible pulse at the nominal frequency. A real oscillator may constrain the range to retain transitions.
A frequency of 440 Hz gives a period of about 2,272.727273 microseconds. At fifty-percent duty, each state lasts about 1,136.363636 microseconds. At twenty-five percent, high time is about 568.181818 microseconds and low time about 1,704.545455 microseconds. These values can help connect an audio-rate pitch reference with the time scale shown by a waveform display. They remain ideal intervals rather than a measurement of a rendered oscillator.
For a sampled waveform, a high interval may correspond to a fractional number of samples at the chosen sample rate. A renderer must decide how to represent transitions, and its anti-aliasing or interpolation can affect the waveform and spectrum. A theoretical microsecond duration therefore does not guarantee that a naive sample-by-sample pulse implementation will preserve that exact duty or sound clean. Keep sample rate and oscillator implementation details with the timing reference when comparing a digital output.
Assumptions and limits
Rise time, fall time, jitter and the threshold used to measure pulse width affect physical timing. The ideal calculation treats transitions as instantaneous. When comparing an oscilloscope reading, record the threshold and measurement definition alongside the nominal frequency and duty setting.
This page calculates timing without generating an audio waveform or sending PWM to hardware. Spectral content, aliasing, DC offset, output level and receiver behavior require additional modeling. A duty-cycle result can help interpret a pulse-width control, but does not establish that a particular digital oscillator implementation is band-limited or artifact free.
Music theory tools → · Frequency to Period Calculator → · W3C Web Audio oscillator context →
Answers before you play
Common questions
Does changing duty cycle change the period?
At a fixed entered frequency, the total period stays fixed. Duty changes the division between high and low time.
What happens at zero or one hundred percent?
The ideal waveform remains at one level without a finite interval at the other level. Physical or software oscillators can restrict those endpoint settings.
Can I enter milliseconds instead of microseconds?
The result is displayed in microseconds. Divide by 1,000 to obtain milliseconds, retaining the same period and duty relationship.
Why might a measured width differ?
Transition times, jitter, threshold definition and the actual oscillator control convention can move a measured pulse width away from the ideal timing calculation.