Utilities Web

UART Baud Rate Calculator

Calculate divisor ratio, error, and register values from clock frequency and target baud rate

How to Use

  1. Select mode (AVR / STM32 / Generic)
  2. Enter clock frequency (example: 16M). Commonly used crystals can also be selected via buttons
  3. Select target baud rate or enter custom value
  4. Actual baud rate, error rate, register values to write (UBRR/BRR), and tolerance judgment are displayed
  5. 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