IAE Academy

TCP formulas

TCP: flow control, congestion control and sockets. 8 formulas for GATE CS Computer Networks, each with when to use it. Each is explained in the topic notes.

All 8 TCP formulas

ACKNOWLEDGEMENT NUMBER

For a segment that arrives in order, with sequence number seq and L data bytes. Because the ACK is cumulative, an out-of-order segment brings back the previous ack number again (a duplicate ACK).

SENDER'S EFFECTIVE WINDOW

rwnd is the receiver's flow-control limit; cwnd is the congestion window from the next section.

MAXIMUM THROUGHPUT WITH WINDOW W

W is in bits when the rate is in bits per second. Assumes no loss, header overhead ignored and ACK transmission time negligible. When the window equals the bandwidth-delay product, the pipe is exactly full. If a question defines one cycle as RTT plus the transmission time of the window (or of a segment), use that cycle in place of RTT.

LINK UTILISATION (SLIDING WINDOW, CONTINUOUS)

Link rate times RTT is the bandwidth-delay product. Keep it in the same unit as W (bits or bytes).

SEQUENCE-NUMBER WRAP-AROUND TIME

The sequence field is 32 bits and counts bytes, so bytes pass before numbers repeat, if the sender sends continuously at the full rate.

MINIMUM SEQUENCE-NUMBER BITS

The condition is that sequence numbers (counting bytes) must not wrap around while a segment can still be alive in the network. The lifetime is the maximum segment lifetime given in the question. Convert the rate from bits to bytes per second by dividing by 8.

RETRANSMISSION TIMEOUT (STANDARD ESTIMATOR)

SRTT and RTTVAR , where R is a new RTT sample. RTTVAR is updated first, using the old SRTT. On the first sample, SRTT = R and RTTVAR = R/2, so RTO = 3R.

MULTIPLICATIVE DECREASE

cwnd is the window at the moment the loss is detected. Unless the question says otherwise, take cwnd/2 in whole MSS (rounded down for an odd window).

Where this was asked: 2018 (2), 2020 (1), 2022 (1), 2023 (1), 2024 (2), 2025 (2), 2026 (3). See the 12 previous-year questions on TCP. This shows what was asked, not what will be asked.