How to Calculate Data Rate from Bandwidth

Data Rate & Capacity Calculator

Calculate maximum channel capacity using the Shannon-Hartley Theorem

Hz kHz MHz

Calculation Results

Theoretical Capacity (C):
In Megabits (Mbps):
Spectral Efficiency:

How to Calculate Data Rate from Bandwidth

Understanding the relationship between bandwidth and data rate is fundamental to telecommunications and networking. While people often use these terms interchangeably, they represent different physical properties of a communication channel.

The Shannon-Hartley Theorem

The maximum data rate (also known as Channel Capacity) is determined by the Shannon-Hartley Theorem. This formula tells us the maximum amount of error-free information that can be transmitted over a communication channel with a specified bandwidth in the presence of noise.

Formula: C = B × log2(1 + S/N)
  • C: Channel Capacity (bits per second)
  • B: Bandwidth (Hertz)
  • S/N: Signal-to-Noise linear power ratio

Steps to Calculate Data Rate Manually

  1. Convert SNR from dB to Linear: If your Signal-to-Noise Ratio is in decibels (dB), convert it using the formula: Ratio = 10^(SNR_dB / 10).
  2. Add 1: Add 1 to the linear ratio calculated in step 1.
  3. Logarithm Base 2: Calculate the log base 2 of that result. (In most calculators, this is log(x) / log(2)).
  4. Multiply by Bandwidth: Multiply the result by the bandwidth in Hertz (Hz) to get the capacity in bits per second.

Practical Example

Suppose you have a channel with a bandwidth of 1 MHz (1,000,000 Hz) and an SNR of 30 dB.

  • Convert 30 dB to linear: 10^(30/10) = 10^3 = 1000.
  • Calculate log2(1 + 1000) ≈ 9.967.
  • Capacity = 1,000,000 × 9.967 = 9,967,000 bits per second (approx. 9.97 Mbps).

The Difference Between Bandwidth and Data Rate

Bandwidth is the width of the frequency range (the size of the "pipe") measured in Hertz. Data Rate is the actual speed of information transfer (the amount of "water" flowing through the pipe) measured in bits per second (bps). Higher bandwidth allows for higher data rates, but the actual speed is limited by the quality of the signal (noise).

function calculateDataRate() { var bandwidth = parseFloat(document.getElementById("bandwidthInput").value); var unitMultiplier = parseFloat(document.getElementById("bandwidthUnit").value); var snrdB = parseFloat(document.getElementById("snrInput").value); var resultsArea = document.getElementById("resultsArea"); var resBps = document.getElementById("resBps"); var resMbps = document.getElementById("resMbps"); var resEfficiency = document.getElementById("resEfficiency"); if (isNaN(bandwidth) || isNaN(snrdB) || bandwidth <= 0) { alert("Please enter valid positive numbers for Bandwidth and SNR."); return; } // Convert bandwidth to Hz var bHz = bandwidth * unitMultiplier; // Convert SNR dB to linear ratio var snrLinear = Math.pow(10, (snrdB / 10)); // Shannon-Hartley: C = B * log2(1 + S/N) // log2(x) = ln(x) / ln(2) var capacityBps = bHz * (Math.log(1 + snrLinear) / Math.log(2)); var capacityMbps = capacityBps / 1000000; var efficiency = capacityBps / bHz; // Formatting results resBps.innerHTML = capacityBps.toLocaleString(undefined, {maximumFractionDigits: 0}) + " bps"; resMbps.innerHTML = capacityMbps.toFixed(3) + " Mbps"; resEfficiency.innerHTML = efficiency.toFixed(2) + " bits/sec/Hz"; resultsArea.style.display = "block"; // Scroll to results if on mobile resultsArea.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); }

Leave a Comment