{
    "name": "TCP Bandwidth-Delay Product Calculator",
    "url": "https://calculators.geekmidst.com/calculators/tcp-bandwidth-delay-product-calculator",
    "markdown": "https://calculators.geekmidst.com/calculators/tcp-bandwidth-delay-product-calculator.md",
    "category": "IT, networking & security",
    "description": "Find the bandwidth-delay product of a path in bytes, the TCP window scale it needs, and the maximum throughput a given receive window allows.",
    "summary": "To keep a link full, TCP must have bandwidth × round-trip time worth of data in flight. If the receive window is smaller than this bandwidth-delay product, throughput is capped at window ÷ RTT.",
    "also_called": [
        "BDP calculator",
        "TCP window size calculator"
    ],
    "applies_to": "Worldwide",
    "last_updated": "2026-10-29",
    "computation": "Results are computed in the visitor’s browser on the HTML page. This API describes the calculator; it does not compute results.",
    "inputs": [
        {
            "name": "bandwidth",
            "label": "Bandwidth",
            "type": "number",
            "default": "1"
        },
        {
            "name": "bandwidth_unit",
            "label": "Bandwidth unit",
            "type": "segmented",
            "default": "Gbps",
            "options": {
                "kbps": "kbps",
                "Mbps": "Mbps",
                "Gbps": "Gbps"
            }
        },
        {
            "name": "rtt_ms",
            "label": "Round-trip time",
            "type": "number",
            "default": "50",
            "unit": "ms"
        },
        {
            "name": "window_kib",
            "label": "Receive window to test",
            "type": "number",
            "default": "64",
            "unit": "KiB"
        }
    ],
    "outputs": [
        {
            "key": "bdp_bytes",
            "label": "Bandwidth-delay product",
            "format": "integer"
        },
        {
            "key": "bdp_mb",
            "label": "BDP",
            "format": "number"
        },
        {
            "key": "bdp_mib",
            "label": "BDP",
            "format": "number"
        },
        {
            "key": "window_scale",
            "label": "Minimum TCP window scale shift",
            "format": "integer"
        },
        {
            "key": "max_throughput_mbps",
            "label": "Max throughput with that window",
            "format": "number"
        },
        {
            "key": "window_fills",
            "label": "Does the window fill the path?",
            "format": "text"
        }
    ],
    "formula": {
        "text": "BDP (bytes) = Bandwidth (bit/s) × RTT (s) ÷ 8;  Max throughput = min(Window × 8 ÷ RTT, Bandwidth);  Scale shift = ⌈log₂(BDP ÷ 65,535)⌉",
        "variables": {
            "Window": "TCP receive window in bytes (1 KiB = 1,024 bytes)",
            "Scale shift": "RFC 7323 window scale option, 0–14"
        }
    },
    "worked_example": {
        "inputs": {
            "bandwidth": "1",
            "bandwidth_unit": "Gbps",
            "rtt_ms": "50",
            "window_kib": "64"
        },
        "steps": [
            "BDP = 10⁹ bit/s × 0.05 s = 5 × 10⁷ bits = 6,250,000 bytes (6.25 MB).",
            "6,250,000 ÷ 65,535 = 95.4, and 2⁷ = 128 ≥ 95.4, so a window scale of 7 is needed.",
            "A 64 KiB window allows 65,536 × 8 ÷ 0.05 s = 10.486 Mbps, about 1% of the link."
        ],
        "result": "A 1 Gbps path with 50 ms RTT needs about 6.25 MB in flight; a 64 KiB window would cap one TCP flow at 10.5 Mbps."
    },
    "interpretation": "Set socket buffers (for example net.ipv4.tcp_rmem on Linux) to at least the BDP for long, fast paths. If raising buffers is not possible, parallel streams each add their own window.",
    "assumptions": [
        "RTT is measured under load, not just idle ping.",
        "Only the receive window limits throughput; packet loss and congestion control are not modelled."
    ],
    "limitations": [
        "With packet loss, TCP throughput falls well below the window limit."
    ],
    "rules": null,
    "faqs": [
        {
            "question": "Why 65,535 bytes?",
            "answer": "The TCP header’s window field is 16 bits. Larger windows need the window scale option, which shifts the value left by up to 14 bits."
        },
        {
            "question": "Is the BDP in MB or MiB?",
            "answer": "Both are shown: buffer settings are usually in bytes, so the exact byte figure is the safest to use."
        }
    ],
    "sources": [],
    "related": [
        {
            "name": "Network Latency (RTT) Calculator",
            "url": "https://calculators.geekmidst.com/calculators/network-latency-rtt-calculator"
        },
        {
            "name": "Network Throughput Calculator",
            "url": "https://calculators.geekmidst.com/calculators/network-throughput-calculator"
        },
        {
            "name": "Download Time Calculator",
            "url": "https://calculators.geekmidst.com/calculators/download-time-calculator"
        }
    ],
    "disclaimer": null,
    "publisher": "GM¹X CalcVerse"
}