UART Baud Rate Calculator
Calculate divisor ratio, error, and register values from clock frequency and target baud rate
How to Use
- Select mode (AVR / STM32 / Generic)
- Enter clock frequency (example: 16M). Commonly used crystals can also be selected via buttons
- Select target baud rate or enter custom value
- Actual baud rate, error rate, register values to write (UBRR/BRR), and tolerance judgment are displayed
- Verify which standard baud rates can be safely used with your clock in the sweep table
Use Cases
- When you need to verify if baud rate error is within tolerance for microcontroller UART setup
- When you need to quickly find register configuration values like UBRR / BRR
- When you need to find which standard baud rates work with your available clock (crystal)
- When you want to select a crystal frequency that achieves 0% error
Frequently Asked Questions
What percentage of baud rate error is acceptable? ▼
The receiver samples 1 bit approximately 16 times, so ±2–3% combined error is generally considered safe. This tool defaults to ±2% tolerance, which you can adjust. Large errors cause sampling position to drift in the frame tail, leading to reception errors.
What is the difference between UBRR and BRR? ▼
Both are registers that divide the clock to generate the baud rate. AVR's UBRR stores the divisor minus 1 and divides by 16× (normal) or 8× (double speed). STM32's BRR stores USARTDIV (= clock ÷ baud rate) directly, with 16× oversampling handled internally. This tool abstracts this difference via mode selection.
Why are non-round frequencies like 1.8432 MHz used for crystals? ▼
1.8432 MHz and its multiples (3.6864 / 7.3728 / 11.0592 MHz, etc.) are "UART crystals" chosen to divide standard baud rates like 9600 and 115200 with exactly 0% error. Using these eliminates divisor error. You can verify 0% error in the sweep table.
Related Tools
Base Converter
Convert numbers between any bases such as binary, octal, decimal, and hexadecimal
Bit Operation Simulator
Visually simulate bitwise operations
Resistor Color Code Calculator
Calculate resistance value from color code, or reverse lookup color code from resistance value
Ohm's Law Calculator
Mutual calculation of voltage, current, resistance, and power
LED Resistor Calculator
Calculate current-limiting resistor for LED circuits
PWM/Timer Configuration Calculator
Calculate and reverse-calculate PWM frequency, duty, resolution, and register settings (PSC/ARR/CCR) from clock and prescaler/counter values
Timer Interrupt Period / Clock Divider Calculator
Calculate interrupt period and frequency from clock, prescaler, and count value. Reverse-calculate optimal PSC/ARR from target period
ADC Resolution, LSB, and Voltage Calculator
Calculate LSB voltage, quantization error, dynamic range, code↔voltage conversion, ENOB, and oversampling from resolution and reference voltage