
File transfer time calculator
Estimate theoretical transfer time from file size and transfer rate.
Your inputs stay in your browser.
Method and assumptions
Method version 1.0.0 · Updated
Estimate duration
Formula: Seconds = size in bytes × 8 ÷ rate in bits per second.
Theoretical estimate at a constant transfer rate.
- size
- File size
- sizeUnit
- Size unit
- speed
- Transfer rate
- speedUnit
- Rate unit
Assumes a constant rate and converts bytes to bits. Protocol overhead, congestion, network variation and processing time are excluded.
Calculate with code
These short examples use the same inputs and core calculation as this tool. Adapt validation and formatting to your application.
JavaScript
const megabytes = 100, megabitsPerSecond = 20;
const seconds = megabytes * 1_000_000 * 8 / (megabitsPerSecond * 1_000_000);
console.log(seconds); // 40 seconds (decimal MB and Mb/s)TypeScript
const megabytes = 100, megabitsPerSecond = 20;
const seconds = megabytes * 1_000_000 * 8 / (megabitsPerSecond * 1_000_000);
console.log(seconds); // 40 seconds (decimal units)Python
size_mb, speed_mbps = 100, 20
seconds = size_mb * 1_000_000 * 8 / (speed_mbps * 1_000_000)
print(seconds) # 40.0 secondsJava
double seconds = 100 * 1_000_000d * 8 / (20 * 1_000_000d);
System.out.println(seconds); // 40.0C#
double seconds = 100 * 1_000_000d * 8 / (20 * 1_000_000d);
Console.WriteLine(seconds); // 40