Works on this device
Clock Divider Calculator
A clock divider makes a slower clock from a faster one: it gives one output cycle for every N input cycles. This calculator works out the output of a divider or a chain of dividers, the ratio for the frequency you want, and the outputs of a binary counter.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Calculate.
Your result
How it was worked out
How to use this calculator
- Choose what you want: the output of one divider, a chain of dividers, the ratio for a frequency, or the outputs of a binary counter.
- Enter the input clock frequency and pick its unit.
- Enter the divide ratio, the stages, the frequency you want or the number of counter stages.
- For a fractional divider, type the number of bits of its fraction register (optional).
- Choose Calculate.
The formulas
- Divide-by-N: output frequency = input frequency ÷ N; output period = N × input period.
- Duty cycle: an even N can give 50%. With one clock edge, an odd N gives (N − 1) ÷ (2N) or (N + 1) ÷ (2N); 50% needs both clock edges.
- Chain of dividers: the total ratio is the product of the ratios of the stages.
- Ratio for a frequency: N = input ÷ output. A whole-number divider uses the whole N whose frequency comes closest. Error = (frequency you get − frequency you want) ÷ frequency you want.
- Fractional division (N + F): the divider counts N + 1 for a share F of the output cycles and N for the rest. The average frequency is right, but each output period jitters by one input period.
- Binary counter: output Qk = input ÷ 2^k.
Worked examples
Divide by 25. A 50 MHz clock divided by 25 gives 2 MHz. Because 25 is odd, a one-edge counter is high for 12 or 13 of the 25 input cycles: 48% or 52%.
Ratio for 7.3 MHz from 50 MHz. The exact ratio is 6.849315. Divide by 7 gives 7.142857 MHz, an error of −2.15%. A fractional divider with a 16-bit fraction register uses 6 + 55,661 ÷ 65,536 = 6.849319 and gives an average of 7.299995 MHz, an error of −0.64 ppm.
Chain. 50 MHz through a divide-by-8 prescaler, a decade counter (÷10) and a flip-flop (÷2): the total ratio is 160 and the output is 312.5 kHz.
Watch crystal. 32.768 kHz through 15 binary counter stages: 32,768 ÷ 2^15 = 1 Hz, a one-second tick.
Limits you should know
- The dividers are ideal: they count every edge and add no jitter of their own. A real counter has a highest clock frequency in its data sheet.
- A clock made by a divider in logic (such as an FPGA) can upset timing analysis; many designs use a clock enable or a clock management block instead.
- For the timers of a microcontroller (prescaler and period register), use the Timer Frequency Calculator. For PWM, use the Pwm Calculator.