Baud Rate Calculator
Calculate UART baud rate error for any clock or crystal frequency — divisor settings, actual vs target baud, and the acceptable error threshold.
| Baud | Bit time | Frame (8N1) |
|---|---|---|
| 110 | 9.091 ms | 90.909 ms |
| 300 | 3.333 ms | 33.333 ms |
| 600 | 1.667 ms | 16.667 ms |
| 1,200 | 833.333 µs | 8.333 ms |
| 2,400 | 416.667 µs | 4.167 ms |
| 4,800 | 208.333 µs | 2.083 ms |
| 9,600 | 104.167 µs | 1.042 ms |
| 14,400 | 69.444 µs | 694.444 µs |
| 19,200 | 52.083 µs | 520.833 µs |
| 38,400 | 26.042 µs | 260.417 µs |
| 57,600 | 17.361 µs | 173.611 µs |
| 115,200 | 8.681 µs | 86.806 µs |
| 230,400 | 4.340 µs | 43.403 µs |
| 460,800 | 2.170 µs | 21.701 µs |
| 921,600 | 1.085 µs | 10.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
Per the STM32F4 series reference manual (RM0090), USART section, the 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.
- What is the baud rate error at 9600 with a 16 MHz clock?
- With the standard UART divisor formula (16 MHz ÷ (16 × 9600) = 104.17, rounded to 104), the actual baud is 9615 — an error of +0.16%, comfortably inside the ~2% tolerance. This is the classic AVR/Arduino case, and why 9600 'just works' on 16 MHz boards.
- What is the difference between baud rate and bits per second?
- Baud counts symbol changes per second; bps counts data bits. For simple UART with one bit per symbol they're numerically equal, but each UART frame also carries start/stop bits — at 9600 baud 8N1, you move about 960 usable bytes per second, not 1,200.
Related tools
- Resistor Color Code Calculator — 4 & 5 Band Decoder
Decode 4-band and 5-band resistor color codes to resistance values instantly, with tolerance — plus a full color chart for common resistor values.
- Ohm's Law Calculator
Calculate voltage, current, resistance, or power using Ohm's Law — enter any two values to solve for the rest. Free, instant results.
- Voltage Divider Calculator — Output Voltage & Resistors
Calculate the output voltage for a resistor voltage divider circuit from input voltage and resistor values. Free, instant, no sign-up.
- 555 Timer Calculator
Calculate frequency, duty cycle, and timing for astable and monostable 555 timer circuits from resistor and capacitor values. Free.
- CRC Calculator Online — CRC-8, CRC-16, CRC-32 & Modbus
Calculate CRC checksums online — CRC-8, CRC-16/Modbus, CRC-16/CCITT, CRC-32, CRC-32C. Text or hex input, results in HEX, DEC and BIN. Browser-only, no upload.