Maximum File Size for BitTorrent v1 Torrents

The theoretical maximum file size addressable by the standard BitTorrent v1 protocol is 16 Exbibytes (EiB), which equals \(2^{64}\) bytes (approximately 18.45 Exabytes or 18.45 billion Gigabytes). This ceiling is determined by the 32-bit integer addressing system used for piece indexes and byte offsets within the standard peer-to-peer wire protocol.


How the Theoretical Limit Is Calculated

The BitTorrent v1 specification (BEP 0003) organizes data into discrete chunks called pieces, and further divides those pieces into blocks for transmission across the network. The theoretical limit is dictated by two primary protocol fields:

  1. Piece Index (32-bit integer): The wire protocol uses a 4-byte (32-bit) unsigned integer to identify which piece is being requested or transmitted. This allows a maximum of \(2^{32}\) (4,294,967,296) distinct pieces.
  2. Piece Offset / Length (32-bit integer): Within each piece, the byte offset (begin field) is also defined by a 4-byte (32-bit) unsigned integer. This permits a single piece to theoretically span up to \(2^{32}\) bytes (4 GiB).

Multiplying the maximum number of pieces by the maximum size per piece yields the protocol’s absolute addressable capacity:

\[\text{Maximum Size} = 2^{32} \text{ pieces} \times 2^{32} \text{ bytes/piece} = 2^{64} \text{ bytes} = 16 \text{ EiB}\]

The Torrent Metadata Constraint

While the network wire protocol can reference up to 16 EiB, the .torrent metadata file creates a severe structural bottleneck:

Theoretical vs. Practical Limits

Although the protocol supports 16 EiB theoretically, real-world constraints limit torrent sizes significantly: