Stax
Tools

Baud Rate Calculator

Calculate UART bit timing and baud rate error for any crystal.

Bit time
104.167 µs
Frame size
10 bits
Frame time
1.042 ms
Effective throughput
7.68 kbps
BaudBit timeFrame (8N1)
1109.091 ms90.909 ms
3003.333 ms33.333 ms
6001.667 ms16.667 ms
1,200833.333 µs8.333 ms
2,400416.667 µs4.167 ms
4,800208.333 µs2.083 ms
9,600104.167 µs1.042 ms
14,40069.444 µs694.444 µs
19,20052.083 µs520.833 µs
38,40026.042 µs260.417 µs
57,60017.361 µs173.611 µs
115,2008.681 µs86.806 µs
230,4004.340 µs43.403 µs
460,8002.170 µs21.701 µs
921,6001.085 µs10.851 µs

How the Baud Rate Calculator works

The baud rate calculator computes UART timing parameters including bit period, frame duration, prescaler register values, and baud rate error percentage for any system clock frequency. Embedded developers use it to configure UART peripherals on STM32, ESP32, AVR, and other microcontrollers, and to verify that the actual baud rate achievable with a given crystal matches the target within ±2% tolerance.

Standard UART baud rates

The most common UART baud rates are 9600, 19200, 38400, 57600, 115200, 230400, 460800, and 921600 baud. At 9600 baud, each bit is 104.17 µs wide. At 115200 baud, each bit is 8.68 µs. The UART protocol samples each bit at its midpoint, so the receiver's oscillator must be accurate enough that accumulated timing error across 10 bit-times does not exceed ±50% of one bit period.

Frame format and timing overhead

A standard 8N1 UART frame consists of 1 start bit + 8 data bits + 1 stop bit = 10 bits total. At 115200 baud, a single byte takes 86.8 µs to transmit. Including 2 stop bits (8N2) adds 8.68 µs per frame. At 9600 baud with 8N1, maximum throughput is only 960 bytes/second — because 2 out of every 10 bits are framing overhead, not payload data.

Prescaler calculation for STM32 and AVR

STM32 UART BRR = f_clock / baud_rate (with integer and fractional parts for USART2 on APB1). For a 16 MHz AVR with UBRR = (f_osc / (16 × baud)) − 1, a 115200 baud rate gives UBRR = 7.68 — rounded to 8, producing an actual rate of 111,111 baud and a −3.5% error, which just exceeds the safe threshold. The calculator shows the exact error so you can choose between double-speed mode (U2X=1) or a more suitable clock frequency.

Baud rate error and crystal selection

Common crystals of 8 MHz, 16 MHz, and 12 MHz do not divide evenly to produce standard baud rates. Using 11.0592 MHz — a non-standard crystal chosen specifically for UART accuracy — gives exactly 0% error at 9600, 19200, 38400, 57600, and 115200 baud. The calculator's error column quickly identifies which baud rate and clock frequency combinations are error-free versus which incur unacceptable drift.

Frequently asked questions

What is baud rate?
Baud rate is the number of symbol changes per second in a communication channel. For binary UART, 1 baud = 1 bit per second, so 9600 baud means 9600 bits per second.
What baud rate error is acceptable?
For UART communication, a baud rate error under 2% is generally acceptable. Above 3–5%, framing errors and data corruption can occur, especially with long frames.
Why do baud rates like 9600 and 115200 exist?
Standard baud rates are derived from UART crystal frequencies (e.g., 1.8432 MHz) that divide evenly to produce common rates. Crystals like 11.0592 MHz were chosen specifically because they produce 0% error at standard baud rates.

Related tools