Stax

…

Tools

Video Bitrate Calculator — File Size and Bitrate Maths

Video bitrate calculator: find the bitrate that fits a size limit, or the file size for a bitrate and length. Includes an FFmpeg command. Free, no upload.

Last updated:

2:00 (120 seconds)

Video bitrate to use
1,488 kbps
Total with audio
1,617 kbps
Expected file size
24.2 MB (23.1 MiB)

The same settings as an FFmpeg command:

ffmpeg -i input.mp4 -c:v libx264 -b:v 1488k -c:a aac -b:a 128k output.mp4

1 kbps is 1,000 bits per second. MB here is 1,000,000 bytes and MiB is 1,048,576 bytes; both are shown for file sizes. Nothing you type leaves your browser.

Was this tool useful?

Use the tool above and you can rate it here.

Turn a size limit into a bitrate

A video file's size is its bitrate multiplied by its length, so the sums work in both directions: pick a bitrate and see how big the file will be, or start from a size limit and find the bitrate that stays under it. This calculator does the arithmetic, counts the audio, leaves a little headroom and writes the matching FFmpeg command. Nothing you type leaves your browser.

The one formula behind it

File size in bytes is (video kbps + audio kbps) × 1,000 ÷ 8 × seconds. For example, 1,000 kbps of video plus 128 kbps of audio for 60 seconds is (1,128 × 1,000 ÷ 8) × 60 = 8,460,000 bytes, which is 8.46 MB or 8.07 MiB. The calculator does this sum for you whichever way round you need it.

Working backwards from a size limit

To fit 25 MB into a video that is 2 minutes long, first take 3 percent off for headroom, leaving 24.25 MB. Spread over 120 seconds that is about 1,617 kbps in total, and with 128 kbps of audio set aside the video gets 1,488 kbps. The calculator rounds the video bitrate down so the file lands under the limit rather than just over it.

MB, MiB and why sites disagree

1 MB is 1,000,000 bytes and 1 MiB is 1,048,576 bytes, about 4.9 percent more. A site that asks for 25 MB might mean either, and file managers do not agree with each other. That is why headroom is on by default, and why results are shown in both units.

What the calculator does not decide

A bitrate is a budget, not a promise of quality. The same number looks better with simple footage than with fast action, and better with a modern codec than with an older one. If the picture looks blocky at the bitrate you get, shorten the clip or lower the resolution instead of squeezing harder. The video compressor does the encoding, and change video resolution makes the picture smaller.

Frequently asked questions

How do I calculate the video bitrate for a file size?
Choose I have a size limit, enter the video length, the size and the audio bitrate. The calculator takes off 3 percent headroom, converts the rest into bits per second over the length, subtracts the audio and shows the video bitrate to use.
How do I calculate the file size from a bitrate?
Add the video and audio bitrates in kbps, multiply by 1,000, divide by 8 to get bytes per second, then multiply by the length in seconds. For 1,000 kbps video and 128 kbps audio over 60 seconds that gives 8,460,000 bytes, or 8.46 MB.
What bitrate should I use for 1080p or 720p video?
There is no single right number, because it depends on the footage, the codec and what the video is for. A practical way is to start from your size limit, read off the bitrate, and judge the result by eye. If it looks blocky, shorten the clip or lower the resolution.
Does the audio count towards the file size?
Yes. The audio bitrate is added to the video bitrate, so a higher audio bitrate leaves less for the picture. Choose No audio if the video is silent.
Why does the calculator leave 3 percent headroom?
The container and the encoder add a little overhead of their own, and some sites count a megabyte differently, so a file that lands exactly on the limit can still be refused. Aiming 3 percent under avoids that. You can switch it off.
What is the difference between MB and MiB?
1 MB is 1,000,000 bytes. 1 MiB is 1,048,576 bytes, about 4.9 percent larger. The calculator shows both so you can compare with whichever your site uses.
Is a higher bitrate always better quality?
Up to a point. More bits let the encoder keep more detail, but beyond what the footage needs there is little visible gain, and a newer codec reaches the same look with fewer bits. Use the bitrate as a budget, not a quality score.
Is anything uploaded, and is it free?
Nothing is uploaded. The calculation runs in your browser and nothing you type leaves it. The calculator is free with no account.

Related tools