Skip to content
πŸ› οΈToolsShed

Bandwidth Delay Product Calculator

Calculate BDP for TCP buffer tuning and get recommended window sizes and sysctl settings.

About this tool

The Bandwidth-Delay Product (BDP) is your link bandwidth multiplied by its round-trip time, and it tells you exactly how much data can be in flight on the wire at any moment. That number sets the ideal TCP window for achieving full throughput on long fat networks, where high speed combines with high latency and an undersized window quietly throttles your transfer.

To use it, enter the link bandwidth and the round-trip latency, then read off the resulting BDP and the suggested TCP window size. It is built for network engineers, sysadmins tuning throughput, and anyone diagnosing slow transfers over high-latency links.

Tip: if the TCP window is smaller than the BDP, the link sits idle waiting for ACKs and throughput suffers, so size your buffers to match. Everything runs locally in your browser.

Frequently Asked Questions

Code Implementation

def bandwidth_delay_product(bandwidth_mbps: float, rtt_ms: float) -> dict:
    """
    Calculate Bandwidth-Delay Product (BDP).
    BDP = Bandwidth Γ— RTT
    This represents the amount of data in transit (in flight) at any time.
    """
    bandwidth_bps = bandwidth_mbps * 1_000_000
    rtt_sec = rtt_ms / 1000

    bdp_bits = bandwidth_bps * rtt_sec
    bdp_bytes = bdp_bits / 8
    bdp_kb = bdp_bytes / 1024
    bdp_mb = bdp_kb / 1024

    # Recommended TCP window size (2x BDP for headroom)
    tcp_window_bytes = int(bdp_bytes * 2)

    return {
        "bdp_bits": int(bdp_bits),
        "bdp_bytes": int(bdp_bytes),
        "bdp_kb": round(bdp_kb, 2),
        "bdp_mb": round(bdp_mb, 4),
        "tcp_window_recommended_bytes": tcp_window_bytes,
        "tcp_window_recommended_kb": round(tcp_window_bytes / 1024, 1),
    }

# Examples
scenarios = [
    ("Home broadband", 100, 20),
    ("Transatlantic fiber", 1000, 70),
    ("Satellite internet", 50, 600),
    ("Data center", 10_000, 1),
]

for name, bw, rtt in scenarios:
    r = bandwidth_delay_product(bw, rtt)
    print(f"{name} ({bw} Mbps, {rtt}ms RTT):")
    print(f"  BDP: {r['bdp_kb']:.1f} KB ({r['bdp_mb']:.2f} MB)")
    print(f"  Recommended TCP window: {r['tcp_window_recommended_kb']:.0f} KB")

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.