Skip to content

CAN / CAN FD Frame Length and Transmission Time Calculator

CAN / CAN FD Frame Length and Transmission Time Calculator

Compute frame bit count (including bit stuffing) and transmission time from baud rate and frame format for bus load estimation.

Frame and Baud Rate

Frame Format
Payload bytes: 8
Worst-case bit stuffing estimation
Baud Rate

Results and Frame Waveform

Segments are proportional to transmission time; not an exact waveform. With BRS on, Data/CRC segments are shortened by the accelerated baud rate.

Arbitration rate: 1 Mbps; Data rate: 5 Mbps

Time Scale
μs/div
8.0 px/μs · width 406px
Total 138 bit, Time 50.80 μs / 0.0508 ms Arb 21.00 μsData 20.20 μsArb 15.00 μsID1114b / 14.0μsCTRL+BRS6b / 6.0μsData80b / 16.0μsCRCACK+EOF+IFS15b / 15.0μs0μs10μs20μs30μs40μs50μs
Bus load: If this message is sent with period T, load ≈ (50.80 μs / T) × 100%. E.g. at 10 ms period ≈ 0.51%.
SOF (1 bit, Arbitration rate) ID11 (14 bit, Arbitration rate) CTRL+BRS (6 bit, Arbitration rate) Data (80 bit, Data rate) CRC (21 bit, Data rate) ACK+EOF+IFS (15 bit, Arbitration rate)

Overview

This tool calculates the bit count and transmission time of a CAN or CAN FD frame from its bit rate and format. It supports exact Classical CAN calculations from actual payload data, worst-case estimates, Linux CAN command generation and a proportional frame-structure diagram.

Features

  • Exact calculation: applies Classical CAN bit-stuffing rules to the actual frame and calculates CRC-15
  • Estimate mode: uses a worst-case stuffing formula for CAN FD or quick planning
  • Linux commands: generates cangen, cansend and sample candump output
  • Frame diagram: displays SOF, identifier, control, data, CRC, ACK and EOF; CAN FD shows arbitration and data phases separately

Input Parameters

Frame Format

ParameterDescription
ProtocolClassical CAN 2.0 or CAN FD
Identifier formatStandard 11-bit or extended 29-bit identifier
BRSCAN FD bit-rate switching; the data phase uses the faster configured rate
Message IDHexadecimal; 0x000–0x7FF for standard or 0x00000000–0x1FFFFFFF for extended
DLC0–8 for CAN 2.0; 0–8, 12, 16, 20, 24, 32, 48, 64 for CAN FD
PayloadSpace-separated hexadecimal bytes, for example 01 02 03 04

Bit Rates

ParameterDescription
Arbitration bit rateNominal phase rate in bit/s; quick values include 125k, 250k, 500k and 1M
Data bit rateCAN FD data-phase rate when BRS is enabled; quick values include 1M, 2M, 4M, 5M and 8M

Calculation Mode

ModeDescription
ExactClassical CAN only; uses the actual payload, bit-stuffing rules and calculated CRC
EstimateWorst-case stuffing overhead, suitable for CAN FD and quick planning

Results

ResultDescription
Total frame bitsBit count including stuffing and inter-frame space
Transmission timeμs and ms values for timing and load calculations
Frame diagramProportional SOF, ID, control, data, CRC, ACK, EOF and IFS sections

Exact Classical CAN Details

Exact mode also reports:

  • Original bit count before stuffing
  • Bit count after stuffing
  • Number of inserted stuff bits
  • Calculated CRC-15 value

Generated Linux Commands

CommandUse
cangenPeriodic transmission with a configurable interval
cansendSend one frame
candumpExample receive output

Bus-Load Estimate

For a frame transmitted every period T:

text
Bus load ≈ (frame transmission time / T) × 100%

The result view shows an example for the selected transmission period.

CAN Frame Structure

Classical CAN Standard Frame

text
SOF + ID(11) + RTR + IDE + r0 + DLC(4) + Data(0–64) + CRC(15) + DEL + ACK + DEL + EOF(7) + IFS(3)

Classical CAN Extended Frame

text
SOF + ID(29) + SRR + IDE + r1 + r0 + DLC(4) + Data(0–64) + CRC(15) + DEL + ACK + DEL + EOF(7) + IFS(3)

CAN FD with BRS

CAN FD can use two rates in one frame:

  • Arbitration phase: SOF, identifier and relevant control fields use the arbitration bit rate.
  • Data phase: payload and CRC use the faster data bit rate when BRS is enabled.

Bit Stuffing

CAN inserts an opposite-polarity stuff bit after five consecutive identical bits.

  • Applied from SOF through the CRC sequence
  • Not applied to CRC delimiter, ACK, ACK delimiter, EOF or IFS
  • A common worst-case estimate adds approximately 20% overhead

Exact stuffing depends on the complete identifier, control fields, payload and CRC; it cannot be inferred from DLC alone.

Linux Command Reference

cangen Options

OptionDescription
-ICAN identifier in hexadecimal
-eExtended identifier
-DPayload in hexadecimal
-LDLC
-gTransmission interval in milliseconds
-fCAN FD frame
-bEnable bit-rate switching

cansend Examples

bash
# Classical CAN standard frame
cansend can0 123#0102030405060708

# Classical CAN extended frame
cansend can0 18DAF110#0102030405060708

# CAN FD with BRS
cansend can0 123##10102030405060708

# CAN FD without BRS
cansend can0 123##40102030405060708

FAQ

What Is Required for an Exact Calculation?

  • Enter the complete payload.
  • Payload length must match the DLC.
  • Exact mode currently supports Classical CAN; CAN FD uses estimate mode.

What Happens if Payload Length Does Not Match DLC?

Exact mode displays a warning and falls back to estimation. Data beyond the selected DLC may be truncated by the input control.

Which Mode Should I Use?

  • Use Exact when the complete Classical CAN payload is known.
  • Use Estimate when only the DLC is known or a quick upper-bound estimate is sufficient.
  • Use Estimate for CAN FD until exact CAN FD stuffing is implemented.

Driving Intelligent Connections, Empowering the Future