Byte Rex
Clock Frequency & Duty Cycle Calculator

Clock Frequency and Duty Cycle

Field: Digital Logic / Computer Engineering

Written and maintained by the PhDino author · Last reviewed 21 September 2026 · Checked against 2 independent reference calculations · how PhDino checks its numbers

The relationship between a clock signal's period, its frequency, and how long it spends high versus low each cycle.

A digital clock signal is a repeating square wave, and its frequency (how many cycles happen per second) is simply the inverse of its period (how long one full cycle takes) — the two describe exactly the same signal from two different, equally valid angles, whichever is more convenient for a given calculation.

Duty cycle describes the shape of that square wave within each period: the fraction of the period the signal spends "high" versus "low." A 50% duty cycle (equal high and low time) is extremely common for general clock distribution, but other duty cycles show up deliberately in applications like PWM (pulse-width modulation) motor control, where the duty cycle itself — not just the frequency — is the value being controlled.

Key formula

Frequency = 1 ÷ period
High time = period × duty cycle
Low time = period − high time
No. 091 / 092Digital Logic / Computer Engineering
Clock Frequency & Duty Cycle
Presented by Byte Rex · Digital Logic & Computing
No. 091 / 092Clock Frequency & Duty Cycle
Frequency = 1 ÷ period
High time = period × duty cycle
Worked example
Clock Period: 10 ns · Duty Cycle: 50 %
→ Clock Frequency: 100 MHz
Checked: this exact example is one of the automated reference tests, its answer worked out independently of the calculator.
phdino.com/calc/clock-frequency

How to use the Clock Frequency & Duty Cycle calculator

Converts a clock period into a frequency and splits each cycle into its high and low times using the duty cycle. Enter the period in nanoseconds and the duty cycle as the percentage of each period the signal spends high.

Reach for it when a datasheet gives one form and you need the other, when checking a clock against minimum pulse-width limits, or when working out how much time each phase of a design that uses both clock edges really gets. Period and frequency are reciprocals, so halving one doubles the other.

Clock Period (ns)
The time for one complete cycle, from one rising edge to the next, in nanoseconds. If you only know the frequency, the period in nanoseconds is 1,000 divided by the frequency in MHz.
Duty Cycle (%)
The share of each period the clock spends high. Oscillators aim for 50%, and their datasheets state how far from it they may stray; 45 to 55% is a common tolerance.

Worked example: a lopsided 250 MHz clock

A clock generator on a board runs with a 4 ns period, but its output is not quite symmetrical: the oscilloscope shows it high for 45% of each cycle. The logic it drives uses both edges, and the flip-flop datasheet asks for a pulse at least 2 ns wide in each state. Is the clock fit for it?

You enterValue
Clock Period4 ns
Duty Cycle45 %
The calculator returnsValue
Clock Frequency250.000 MHz
High Time1.800 ns
Low Time2.200 ns

Worked by hand:

  1. Frequency. f = 1 ÷ T, and with T in nanoseconds that is 1,000 ÷ 4 = 250 MHz.
  2. Time high. 4 ns × 45% = 1.80 ns.
  3. Time low. 4 − 1.80 = 2.20 ns.

The clock runs at 250 MHz, but at 45% duty its high phase lasts only 1.80 ns, short of the 2 ns the flip-flops need, while the low phase of 2.20 ns is fine. Logic that works on one edge alone would not notice; logic that uses both edges gets only the shorter half. Even a perfect 50% clock would give 2.00 ns per phase, with no margin at all, so the real fix is a slower clock or faster parts, not just a duty-cycle correction.

Reading the result: frequency is the headline, the halves do the work

Frequency tells you how many times per second a clocked system can act. The high and low times matter for anything that responds to a level or to both edges: each half of the cycle has to be long enough for whatever happens in it.

  • Units: 1 ns corresponds to 1,000 MHz (1 GHz), 10 ns to 100 MHz and 1 µs to 1 MHz. Mixing nanoseconds and microseconds is the commonest slip.
  • Minimum pulse width is a datasheet limit for flip-flops and clock inputs. Check both the high and the low time against it.
  • Real clocks also have jitter, a small variation from one cycle to the next, and finite rise and fall times. Timing budgets subtract them from the ideal period, so the usable time is a little shorter than these figures.
  • A clock that passes through buffers can arrive with a different duty cycle, because rising and falling edges are delayed by different amounts.

Notes & limitations

  • Real clock signals aren't perfect square waves — actual rise/fall times, jitter (cycle-to-cycle timing variation), and duty-cycle distortion all exist in real hardware, though they're usually small enough to ignore for basic frequency/period planning.
  • A circuit's clock period has to be long enough to satisfy the slowest signal path's propagation delay plus setup time — see Logic Gate Propagation Delay and Flip-Flop Setup/Hold Margin for how a clock period gets checked against real circuit timing, not just chosen freely.

Common mistakes

  • Mixing up period and frequency units: 4 ns is 250 MHz, not 25 or 2,500.
  • Assuming a 50% duty cycle when the part does not promise one. Check the oscillator datasheet before relying on half a period.
  • Using the full period where only one phase is available, for example in logic that launches data on the rising edge and captures it on the falling edge.
  • Forgetting jitter and skew, which take their share of each period before any logic delay is counted.

Frequently asked questions

What is the period of a 16 MHz clock?

62.5 ns: 1,000 divided by 16. The same rule works in reverse, so a 62.5 ns period is a 16 MHz clock.

Why does duty cycle matter if everything happens on the rising edge?

For single-edge logic it mostly does not, as long as each phase meets the minimum pulse width. It matters when both edges are used, and in circuits such as PWM outputs, where the fraction of time spent high sets the average output.

How does clock frequency relate to how fast a circuit can run?

The period must be at least as long as the slowest path between two flip-flops: clock-to-Q delay plus logic delay plus setup time. The Flip-Flop Timing Margin calculator checks that budget for a given period.

Can the duty cycle be 0 or 100%?

Not for a clock: at 0% or 100% the signal never changes, so there are no edges to clock anything. The calculator accepts 1 to 99%.

Further reading

PhDino earns a commission on qualifying purchases made through this link, at no extra cost to you.

Code: The Hidden Language of Computer Hardware and Software by Charles Petzold — Builds from switches and logic gates up to a working computer, one clear step at a time. (Bookshop.org UK, UK delivery only)

→ The full PhDino bookshelf on Bookshop.org (UK delivery only)

Educational tool — not a substitute for a licensed engineer or the official code text.