Advertisement
Advertisement
EMBEDDED

Baud Rate Calculator — bit rate, UART frame time and clock error

Convert between baud, bit rate and bits per symbol, then work out the UART frame time, the real byte throughput and how far your clock divisor lands from the rate you asked for.

Baud is symbols per second. On a plain two-level serial line one symbol carries one bit, so baud and bit rate are equal. Multi-level modulation carries more, and the two figures separate.
Every asynchronous frame also carries one start bit, which is counted automatically. The classic 8N1 setting is eight data bits, no parity and one stop bit.
The receiver samples each bit several times to find its centre. The divisor is the clock divided by the oversampling factor and the target baud, rounded to a whole number.
Enter the tolerance your device datasheet allows. This page does not supply one, because it depends on the framing, the oversampling and the receiver's own tolerance budget.
Line bit rate
 
 
0
Bits per frame and overhead
0
Time for one frame
0
Payload throughput
0
Clock divisor error
Tip: the most common serial fault is not a wrong baud setting but a clock that cannot produce the requested rate exactly. A few per cent of error accumulates across a frame until the last bit is sampled in the wrong place.
Advertisement

The baud rate calculator above does three related jobs. It separates baud from bit rate, which are the same number only in the simplest case and different in every interesting one. It turns a UART framing choice into a frame time and a real payload throughput. And it works out what divisor your peripheral clock will actually land on, and how far that is from the rate you asked for.

Arb Digital builds free tools that are precise about definitions. Baud is a symbol rate, and the term is defined that way in ITU-T Recommendation V.7, Definitions of terms concerning data communication over the telephone network. Treating baud and bits per second as synonyms is a habit inherited from links where every symbol did carry exactly one bit, and it stops being harmless as soon as the modulation carries more.

What This Baud Rate Calculator Does

The first conversion is the easy one. Bit rate equals baud times the number of bits each symbol carries, and the number of bits per symbol is the base-two logarithm of the number of distinct symbols the modulation uses. Two levels carry one bit, four carry two, sixteen carry four, and so on. That is why a modem quoting a high bit rate can still be running at a modest symbol rate.

The second is framing. Asynchronous serial sends each character wrapped in a start bit and one or more stop bits, with an optional parity bit, and every one of those is line time that carries no payload. The tool counts the total bits in a frame, reports the fraction that is overhead, and converts the rest into a byte-per-second figure that reflects what an application will actually see.

The third is the clock. A UART generates its bit timing by dividing a peripheral clock by a whole number, so most requested baud rates are not achievable exactly. The tool computes the nearest divisor, the baud that divisor really produces, and the resulting error as a percentage of the target.

How to Use It

  1. Enter the symbol rate you are configuring. For an ordinary serial port this is the number you would type into a terminal program.
  2. Set bits per symbol. Leave it at one for UART, RS-232 and RS-485. Raise it for modulation schemes that encode several bits per symbol.
  3. Choose the framing. Data bits, parity and stop bits together set the frame length; the start bit is always present and is counted for you.
  4. Enter your peripheral clock and oversampling. These come from the device datasheet and the clock tree you have configured, not from the baud rate.
  5. Enter the tolerance your device allows. The page compares the computed error against your figure and never supplies a limit of its own.

The Formula: How It Is Calculated

Bit rate is baud times bits per symbol. Bits per frame is one start bit, plus the data bits, plus one bit if parity is enabled, plus the stop bits. Frame time is bits per frame divided by the bit rate. Frames per second is the reciprocal of that, and payload throughput is frames per second times the data bits, divided by eight to give bytes.

The divisor is the peripheral clock divided by the product of the oversampling factor and the target baud, rounded to the nearest whole number. The achieved baud is the clock divided by the oversampling factor and that rounded divisor, and the error is the achieved rate minus the target, divided by the target.

Work the defaults. At 115,200 baud with one bit per symbol the line rate is 115,200 bit/s. An 8N1 frame is one start bit plus eight data bits plus one stop bit, so ten bits, of which two are overhead: exactly twenty per cent. One frame takes ten divided by 115,200 seconds, which is 86.81 microseconds, giving 11,520 frames per second and therefore 11,520 bytes per second of payload. On the clock side, 16 MHz with sixteen-times oversampling gives a 1 MHz bit-clock reference, and 1,000,000 divided by 115,200 is 8.68, which rounds to a divisor of 9. That divisor produces 111,111.11 baud, an error of −3.55 per cent.

Advertisement

Why 16 MHz and 115,200 Are a Bad Pair

That −3.55 per cent is not a rounding curiosity, it is the reason a whole generation of hobby boards shipped with 16 MHz crystals and mysterious serial corruption. The receiver finds the start edge, then samples each subsequent bit at what it believes is the centre. If the two ends disagree about bit length by three and a half per cent, the sampling point drifts by that fraction of a bit on every bit, and after nine or ten bits the accumulated drift has walked off the end of the last bit entirely.

The practical tolerance follows directly from that arithmetic. A ten-bit frame can absorb roughly a half-bit of total drift before the final sample lands wrong, which is about five per cent split between the two ends, and the University of Texas at Austin's Chapter 11 on serial interfacing quotes about five per cent as the margin for proper operation. Since both ends have error, and both have temperature drift, a budget of a couple of per cent per end is the usual working figure. Longer frames, with nine data bits and two stop bits, tolerate less.

The fix is not a faster clock but a better-chosen one. Clocks like 14.7456 MHz and 18.432 MHz exist precisely because they divide exactly into the standard rates, and a fractional divisor, which many modern UARTs provide, achieves the same thing on an arbitrary clock. If your device has one, the integer error shown here is a worst case rather than a verdict.

Baud Versus Bit Rate, and Why the Distinction Survives

On a two-level line the two numbers coincide, which is why the terms became interchangeable in casual use. They separate the moment a symbol carries more than one bit. A four-level scheme running at 1,200 baud carries 2,400 bit/s; a sixteen-point constellation at the same symbol rate carries 4,800.

The distinction matters because the two quantities are limited by different things. Symbol rate is constrained by the channel's bandwidth, since each symbol needs room in the spectrum. Bits per symbol are constrained by the signal-to-noise ratio, because distinguishing sixteen levels needs a cleaner channel than distinguishing two. That is why a noisy line can be fast in baud and slow in bits, and a quiet one the reverse.

It also explains a persistent confusion about serial ports. A device advertised as running at 115,200 baud is doing exactly 115,200 symbols per second, and because it is a two-level line that is 115,200 bit/s, but only 92,160 bit/s of that is payload under 8N1. The bandwidth converter is the right tool for rescaling those figures between units once you know which one you have.

Where the Overhead Actually Goes

Framing overhead is the visible part. Under 8N1 it is twenty per cent; adding parity and a second stop bit takes a frame to twelve bits and the overhead to a third. Those two extra bits buy a single-bit error detection capability and a longer inter-character gap for slow receivers, and whether they are worth a third of the line is a design question rather than an arithmetic one. The parity bit calculator covers what that one bit can and cannot detect, and the Hamming code calculator covers schemes that correct rather than merely detect.

The invisible part is gaps. Asynchronous framing means the line may idle between characters, and a sender that assembles frames in software rather than from a buffer will leave gaps that no formula predicts. Flow control adds more: a receiver asserting a hardware handshake stops the sender for as long as it needs. A measured throughput below the figure here is usually explained by one of those, not by the framing.

How This Page Sits Beside the Other Link Tools

The boundary in one sentence: this page computes the throughput and timing of a serial link where framing and clock division set the ceiling, while the bandwidth delay product calculator covers packet networks where the window and the round-trip time set it instead.

Convert between rate units with the bandwidth converter, and separate the physical part of latency with the propagation delay calculator. On the data side, the number base converter handles the register values you will write into a divisor, and the binary fraction converter covers the fractional part that fractional-divisor UARTs use.

Need a website that loads fast and actually works?

Arb Digital builds free tools like this one because useful pages earn attention. If you want tools, calculators or content built for your own audience, we can help.

See Our Web Design Work Talk to Arb Digital

Common Mistakes to Avoid

  • Treating baud as bits per second — they are equal only when each symbol carries one bit, which is true of UART and false of most modulated links.
  • Dividing the bit rate by eight for throughput — a byte occupies ten line bits under 8N1, so dividing by eight overstates payload by a quarter.
  • Ignoring the clock divisor — the requested rate and the achievable rate are different numbers, and the gap is what corrupts frames.
  • Budgeting the whole tolerance to one end — both ends have error and both drift with temperature, so the margin has to be shared.
  • Forgetting that longer frames tolerate less — accumulated drift scales with frame length, so nine data bits and two stop bits shrink the allowable error.

Related Free Tools From Arb Digital

For packet networks rather than serial links, see the bandwidth delay product calculator and the bandwidth converter. The propagation delay calculator separates distance from processing in a latency figure, the parity bit calculator and Hamming code calculator cover error detection and correction, and the number base converter and binary fraction converter handle the register arithmetic. Browse the full free online tools hub for everything else.

Frequently Asked Questions

Is baud the same as bits per second?

Only when each symbol carries exactly one bit, which is the case on ordinary two-level serial lines. Baud is a symbol rate, defined that way in ITU-T Recommendation V.7. Bit rate is baud multiplied by the bits each symbol carries.

Why is my throughput lower than the baud rate divided by eight?

Because each byte is wrapped in framing. Under 8N1 a byte occupies ten line bits, so the payload is eight tenths of the line rate, not eight eighths. Adding parity and a second stop bit reduces it further.

What clock error can a UART tolerate?

It depends on the frame length, the oversampling and the receiver, and it is a budget shared between both ends. A ten-bit frame can absorb roughly half a bit of accumulated drift in total, and device datasheets state the figure that applies. This page compares against the tolerance you enter.

Why does 16 MHz give a bad 115,200 baud?

Because 16,000,000 divided by 16 is 1,000,000, and 1,000,000 divided by 115,200 is 8.68, which is not a whole number. Rounding to a divisor of 9 produces 111,111 baud, about 3.55 per cent low, which is enough to shift the sampling point off the last bits of a frame.

What is oversampling for?

The receiver samples each bit several times so it can locate the centre of the bit rather than its edge, which makes it tolerant of small timing differences. Sixteen samples per bit is common; lower factors allow higher baud rates from the same clock but reduce timing margin.

Does the start bit count as data?

No. The start bit exists purely so the receiver can detect the beginning of a frame and synchronise its sampling, and it carries no payload. It is counted as overhead here, along with parity and the stop bits.

Can a fractional divisor fix the error?

Many modern UARTs support a fractional part on the divisor, which greatly reduces the error on an awkward clock. This page computes the integer case, so if your device has a fractional divisor the error shown is a worst case rather than the value you will achieve.

Why do crystals like 14.7456 MHz exist?

Because they divide exactly into the standard serial rates. Dividing 14,745,600 by 16 gives 921,600, which is an exact multiple of 115,200, 57,600, 38,400 and the rest, so the divisor is a whole number and the error is zero.

Advertisement
Advertisement

Take it further