Video Length from File Size Calculator

Video Length from File Size Calculator

Leading AI Skill PRO

Enter Calculation

Formula

Duration (s)=File Size (MB)×1,000,000×8Bitrate (Mbps)×1,000,000\text{Duration (s)} = \frac{\text{File Size (MB)} \times 1{,}000{,}000 \times 8}{\text{Bitrate (Mbps)} \times 1{,}000{,}000}

Example

Duration (s)=700×1,000,000×85×1,000,000=1,120\text{Duration (s)} = \frac{700 \times 1{,}000{,}000 \times 8}{5 \times 1{,}000{,}000} = 1{,}120
Usage stats

Advertisement

Results

Estimated Video Length
0h 18m 40s
1,120 seconds total
Total seconds 1,120 s
Total minutes 18.67 min
Hours 0
Minutes 18
Seconds 40

Report an error on this page

What This Calculator Does

The Video Length from File Size Calculator estimates how long a video file will play based on its total file size and its average total bitrate (video stream plus audio stream combined). It is handy when you want to predict the runtime of an export, check whether a file matches an expected length, or reverse-engineer the duration of media when only the size and bitrate are known.

How to Use It

Enter the file size and pick its unit (KB, MB, or GB). Then enter the total bitrate and choose Mbps or kbps. The calculator converts everything to consistent units, divides total bits by bits per second, and reports the result in seconds as well as a clean hours/minutes/seconds breakdown.

The Formula Explained

A file's size is measured in bytes, but bitrate is measured in bits per second. Since one byte equals 8 bits, we first multiply the file size in bytes by 8 to get the total number of bits. Dividing that total by the bitrate (in bits per second) yields the playback duration in seconds:

$$\text{durationSeconds} = \frac{\text{fileSizeBytes} \times 8}{\text{totalBitrateBitsPerSec}}$$

This uses decimal units (1 MB = 1,000,000 bytes, 1 Mbps = 1,000,000 bits/s), which match how bitrate and storage are usually advertised for video.

Advertisement
Diagram showing file size and bitrate combining to give video duration
Duration equals file size (in bits) divided by the total bitrate.

Worked Example

Suppose you have a 700 MB file encoded at a total bitrate of 5 Mbps. The file size in bits is \(700 \times 1{,}000{,}000 \times 8 = 5{,}600{,}000{,}000\) bits. The bitrate is \(5{,}000{,}000\) bits/s. Duration:

$$\text{Duration} = \frac{5{,}600{,}000{,}000}{5{,}000{,}000} = 1{,}120 \text{ seconds}$$

which is 18 minutes and 40 seconds.

Advertisement
Bar comparison showing larger files or lower bitrates produce longer videos
Bigger files or lower bitrates yield longer playback time.

Key Terms Defined

  • File size — the total amount of data stored, measured in bytes (B, KB, MB, GB). It includes every stream in the file plus the container structure, not just the picture.
  • Bit vs byte — 1 byte = 8 bits. Sizes are quoted in bytes (capital B), bitrates in bits (lowercase b). Mixing them up is the most common source of an eight-fold error.
  • Bitrate — the data rate of a stream, in bits per second (bit/s), usually written kbps or Mbps. Higher bitrate means more data per second, so more quality and a shorter runtime for a given file size.
  • Total (muxed) bitrate — the combined rate of all streams multiplexed into the file: video + audio + subtitles + overhead. This is the value the calculator expects. Media tools such as MediaInfo report it as "Overall bit rate".
  • Video bitrate — the rate of the compressed picture stream alone. It dominates the total, but using it by itself slightly overestimates duration because the audio is ignored.
  • Audio bitrate — the rate of the sound stream, typically 128–320 kbps for stereo AAC or MP3; multichannel or lossless tracks run considerably higher. Add it to the video bitrate to get the total.
  • CBR (constant bitrate) — encoding that holds the data rate essentially fixed throughout. Duration estimates from file size are most accurate here.
  • VBR (variable bitrate) — encoding that spends more bits on complex scenes and fewer on simple ones. The bitrate you enter for a VBR file is the average over the whole runtime, so the estimate is an approximation.
  • Container / muxing overhead — the headers, index (seek) tables, chapter data and metadata that wrap the streams in an MP4, MKV or MOV file. It is real but small, usually well under 1–2% of the file, and makes the true duration a touch shorter than a raw calculation suggests.
  • Duration — the playback runtime, computed in seconds and then displayed as hours, minutes and seconds (h:mm:ss). For instance 4,000 seconds is shown as 1:06:40.

FAQ

Should I include audio in the bitrate? Yes. Use the combined (muxed) bitrate of video plus audio for the most accurate result. If you only know the video bitrate, add the audio bitrate (commonly 128–320 kbps).

Why is my actual file slightly different? Container overhead, variable bitrate (VBR) encoding, and metadata mean real files vary a little from this average-bitrate estimate.

Decimal or binary units? This tool uses decimal MB/GB (powers of 1000), the convention used by most bitrate and streaming specifications.

Last updated:

Most popular in Digital Life

View all Digital Life calculators