{
  "id": "bandwidth",
  "version": "4e053f965572",
  "status": "published",
  "name": "Bandwidth Calculator",
  "question": "How much bandwidth do I need?",
  "summary": "Works out a website’s monthly data transfer (bandwidth) from its daily visitors, pages per visit and page size, and the average connection speed in Mbps that carries it.",
  "category": "logic",
  "subcategory": "networks",
  "url": "https://www.acalculator.org/logic/bandwidth-calculator",
  "markdown": "https://www.acalculator.org/logic/bandwidth-calculator.md",
  "kind": "function",
  "method": "Monthly bytes = visitors a day × pages per visit × page size × days × margin factor. GB = bytes ÷ 10⁹. Average Mbps = bytes × 8 ÷ (days × 86,400 s) ÷ 10⁶.",
  "assumptions": [
    "Every page view sends the full page size; browser caching, which lowers repeat views, is not counted.",
    "Traffic is spread evenly over the day; the average speed is not the peak a server must handle.",
    "GB means 10⁹ bytes and Mbps 10⁶ bits per second; 1 byte is 8 bits."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "v": {
        "title": "Visitors a day",
        "description": "The average number of visits to the site in a day.",
        "type": "number",
        "exclusiveMinimum": 0,
        "maximum": 1000000000
      },
      "p": {
        "title": "Pages per visit",
        "description": "The average number of pages each visitor opens.",
        "type": "number",
        "exclusiveMinimum": 0,
        "maximum": 1000
      },
      "s": {
        "title": "Average page size",
        "description": "The data one page view sends: the page with its images, scripts and styles.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "data-size",
        "minimum": 1,
        "maximum": 10000000000
      },
      "d": {
        "title": "Days in the month",
        "description": "How many days to count as a month.",
        "type": "integer",
        "minimum": 1,
        "maximum": 31
      },
      "f": {
        "title": "Margin factor",
        "description": "A multiplier for room above the average: 1 means none; 1.5 plans for half as much again (peaks, bots, downloads).",
        "type": "number",
        "minimum": 1,
        "maximum": 100
      }
    }
  },
  "outputs": {
    "monthly": {
      "label": "Data transfer per month (GB)",
      "description": "Visitors × pages × page size × days × margin factor, in gigabytes (10⁹ bytes).",
      "format": "number"
    },
    "daily": {
      "label": "Data transfer per day (GB)",
      "description": "The monthly figure ÷ the days.",
      "format": "number"
    },
    "mbps": {
      "label": "Average speed (Mbps)",
      "description": "The monthly bits ÷ the seconds in those days, in megabits per second: the steady rate that carries it.",
      "format": "number"
    },
    "views": {
      "label": "Page views per month",
      "description": "Visitors × pages × days (no margin).",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "v": 1000,
      "p": 3,
      "s": "2 MB",
      "d": 30,
      "f": 1
    },
    "outputs": {
      "monthly": 180,
      "daily": 6,
      "mbps": 0.5555555555555556,
      "views": 90000
    },
    "text": "1,000 visitors a day at 3 pages of 2 MB need 180 GB a month, an average of 0.556 Mbps."
  },
  "examples": [
    {
      "given": {
        "v": 1000,
        "p": 3,
        "s": 2000000,
        "d": 30,
        "f": 1
      },
      "expect": {
        "monthly": 180,
        "daily": 6,
        "mbps": 0.5555555555555556,
        "views": 90000
      },
      "source": "NIST, Metric (SI) prefixes (kilo 10³, mega 10⁶, giga 10⁹, tera 10¹²), https://www.nist.gov/pml/owm/metric-si-prefixes (retrieved 2026-10-05); hand calculation in content.mdx: 1,000 × 3 × 30 = 90,000 views × 2 MB = 180 GB; 1.44 × 10¹² bits ÷ 2,592,000 s = 0.556 Mbps"
    },
    {
      "given": {
        "v": 25000,
        "p": 4.2,
        "s": 1500000,
        "d": 31,
        "f": 1.5
      },
      "expect": {
        "monthly": 7323.75,
        "mbps": 21.875
      },
      "source": "NIST, Metric (SI) prefixes (kilo 10³, mega 10⁶, giga 10⁹, tera 10¹²), https://www.nist.gov/pml/owm/metric-si-prefixes (retrieved 2026-10-05); hand calculation in content.mdx: 25,000 × 4.2 × 1.5 MB × 31 × 1.5 = 7,323.75 GB; × 8 ÷ (31 × 86,400) = 21.875 Mbps"
    },
    {
      "given": {
        "v": 500,
        "p": 2,
        "s": 819200,
        "d": 30,
        "f": 1
      },
      "expect": {
        "monthly": 24.576
      },
      "source": "hand calculation in content.mdx: 800 KiB = 819,200 bytes; 500 × 2 × 30 × 819,200 = 24.576 × 10⁹ bytes (NIST binary prefixes, https://physics.nist.gov/cuu/Units/binary.html, retrieved 2026-10-05)"
    }
  ],
  "sources": [
    "NIST, Metric (SI) prefixes: kilo 10³, mega 10⁶, giga 10⁹. https://www.nist.gov/pml/owm/metric-si-prefixes (retrieved 2026-10-05)",
    "NIST, Prefixes for binary multiples: kibi 2¹⁰, mebi 2²⁰. https://physics.nist.gov/cuu/Units/binary.html (retrieved 2026-10-05)"
  ],
  "related": [
    "download-time",
    "internet-speed",
    "subnet"
  ],
  "changelog": []
}
