Internet Speed Calculator Formula

Understand the math behind the internet speed calculator. Each variable explained with a worked example.

Formulas Used

Download Time

download_seconds = file_mb / speed_mbytes

Download Time (minutes)

download_minutes = file_mb / speed_mbytes / 60

Speed in MB/s

speed_megabytes = speed_mbytes

Variables

VariableDescriptionDefault
speed_mbpsConnection Speed(Mbps)100
file_size_gbFile Size(GB)5
speed_mbytesDerived value= speed_mbps / 8calculated
file_mbDerived value= file_size_gb * 1024calculated

How It Works

How Internet Speed Relates to Download Time

Internet speed is measured in megabits per second (Mbps), but file sizes are in megabytes (MB). There are 8 bits in a byte.

Formula

Speed (MB/s) = Speed (Mbps) / 8

Download Time (sec) = File Size (MB) / Speed (MB/s)

Worked Example

Download a 5 GB file on a 100 Mbps connection.

speed_mbps = 100file_size_gb = 5
  1. 01Speed in MB/s = 100 / 8 = 12.50 MB/s
  2. 02File size in MB = 5 x 1,024 = 5,120 MB
  3. 03Download time = 5,120 / 12.50 = 409.6 seconds
  4. 04In minutes = 409.6 / 60 = 6.8 minutes

Ready to run the numbers?

Open Internet Speed Calculator