How-to guide

How to Calculate Modbus CRC for RTU Frames

CRC-16/Modbus init value, polynomial, byte order, and a repeatable frame check.

Quick path

Use the Modbus CRC Calculator when you need a repeatable CRC value for an RTU request or response. Enter only the bytes before the checksum, then append the low CRC byte followed by the high CRC byte.

What to enter

ASCII mode encodes the characters you type. For the standard check vector, type 123456789 as text. Hex mode is for copied frame bytes from a serial analyzer, such as 01 03 00 00 00 0A. Do not include the final two CRC bytes from an existing frame when recalculating.

Parameters

Initial value0xFFFF
Polynomial0xA001 reversed form of 0x8005
Byte order on wireLow CRC byte, then high CRC byte
Known vectorASCII 123456789 gives 0x4B37

Manual calculation flow

  1. Start with the register set to 0xFFFF.
  2. XOR the next data byte into the low byte of the register.
  3. Process 8 bits least-significant bit first, shifting right each time.
  4. When the shifted-out bit is 1, XOR the register with 0xA001.
  5. After the last data byte, append the register low byte first, then the high byte.

Debug checklist

  • Do not include the two trailing CRC bytes when recalculating an existing frame.
  • Confirm whether your serial tool displays numeric CRC value or transmission byte order.
  • If another tool shows 0x374B, check whether it is showing wire byte order instead of the numeric CRC.
  • Check that hex strings have complete bytes and no copied timestamp text.

Next step

Open the Modbus CRC Calculator, switch between ASCII and hex input, and compare the calculated frame against the bytes your device actually transmits.