Calculate Video File Size from Bitrate and Duration: Formula, Examples, and Limits
Reviewed 30 October 2026. To estimate video file size, add the average video and audio bitrates, multiply by duration in seconds, and divide by eight to convert bits to bytes. Keep the units consistent and treat the result as an estimate until the final file is measured.
The core formula
estimated bytes = (video bits/second + audio bits/second) × duration seconds ÷ 8
NIST's software-measurement guidance defines a byte as eight bits. That conversion is why the formula divides by eight. For decimal storage, one megabyte is one million bytes; operating systems may also display binary units, where one mebibyte is 1,048,576 bytes.
Worked example: fifteen minutes at 12 Mbps
Assume 12 Mbps video, 384 kbps audio, and a duration of 15 minutes:
- Convert audio: 384 kbps = 0.384 Mbps.
- Add rates: 12 + 0.384 = 12.384 Mbps.
- Convert duration: 15 × 60 = 900 seconds.
- Calculate:
12.384 × 900 ÷ 8 = 1,393.2 MB.
The planned file is about 1.39 GB in decimal units before allowing for container overhead or a variable encode that finishes above or below the target average.
Why the finished file can differ
- VBR is variable: the configured value may be a target, maximum, or quality control rather than the exact average achieved.
- Containers add data: indexes, timestamps, metadata, chapters, subtitles, and muxing structures occupy space.
- More streams add up: alternate audio tracks and embedded subtitles must be included.
- Displayed units differ: GB and GiB are not interchangeable.
- Duration may differ slightly: frame boundaries, audio padding, and edit lists can affect the measured runtime.
Measure the result
FFmpeg's ffprobe reads container and stream information in a machine-readable form. Use it to check duration, codec, stream count, and reported bitrates after encoding. When a stream does not report a reliable bitrate, calculate the observed average from the final file size and measured duration.
The NexxiqAI video file-size calculator performs the same unit-safe estimate and lets you compare alternate bitrates before spending time on an encode.
Limitations
The formula predicts storage from an average rate; it does not predict perceived quality, upload processing, or the size of a quality-targeted encode. Always leave operational headroom when a delivery system has a hard file-size limit.
Primary sources
- NIST IR 8289 — software measurement quantities and the eight-bits-per-byte relationship.
- ffprobe documentation — inspecting multimedia containers and streams.
- YouTube recommended upload encoding settings — current examples of destination-specific video and audio rates.