UART Baud Rate Divisor & Error Calculator
Check whether your clock can produce a baud rate accurately, before you wonder why serial output is garbled.
Use the tool
Why this tool exists
Enter the clock frequency and target baud rate. For normal (16x) and double-speed (8x) modes the page computes the exact divisor, the rounded register value (UBRR = round(f/(oversampling*baud)) - 1), the baud rate actually generated, the error percentage and a verdict (under about 2% is fine, around 3% is marginal).
Both ends need to agree within the UART tolerance, so errors on each side add up. Crystals such as 18.432 MHz and 3.6864 MHz divide evenly into standard baud rates.
No data is sent anywhere: the work happens in your browser, so you can use it offline once the page has loaded.
How to use it
- Enter the clock in Hz and the baud rate.
- Compare normal and double-speed mode.
- Pick the register value with the smallest error.
- Choose a different crystal if both are poor.
Frequently asked questions
What error is acceptable?
Roughly under 2% in total between transmitter and receiver.
What is U2X?
The AVR double-speed bit that halves the oversampling to 8x.
Do other MCUs use the same formula?
Many do with small variations; check the datasheet.
Is my data sent anywhere?
No. Everything is processed in your browser, and the page makes no network requests with your input.