Tool

Video size calculator

Two questions, one formula: size = bitrate × duration. Work out what fits under a cap, or how big a video will turn out.

What bitrate fits under a limit?

Needs JavaScript — or use the formula below.

How big will it be?

Needs JavaScript — or use the formula below.

How it works

A video's size is its bitrate — how much data it uses each second — multiplied by how many seconds it runs. Bitrate is measured in bits, and file size in bytes, and there are 8 bits in a byte:

size in bytes   = (video bitrate + audio bitrate) × seconds ÷ 8
bitrate that fits = size in bytes × 8 ÷ seconds − audio bitrate

This calculator uses the same units as Ninja and as most platforms' help pages: 1 MB = 1,000,000 bytes. A few systems count 1,048,576 bytes to the megabyte; the difference is under 5%, and the decimal figure is the safer one. It also sets 3% aside for the container's own headers and indexes.

The resolution suggestion

More pixels need more bitrate to look equally clean. The suggestion is the largest resolution that gets at least 0.045 bits per pixel per frame — a rule of thumb for H.264 that looks clean at phone size. HEVC and AV1 look good with less, so treat the suggestion as conservative: if the video will be watched on a phone, the next resolution up is often fine.

Worked example

A 90-second clip for WhatsApp's 16 MB media limit: 16,000,000 × 8 × 0.97 ÷ 90 ≈ 1.38 Mbps in total. Take away 128 kbps for audio and about 1.25 Mbps is left for the picture — just enough for 720p at 30 fps by the rule of thumb above. That's exactly the combination Ninja's WhatsApp preset aims for. More in sending long videos on WhatsApp.

Frequently asked questions

How do I calculate video file size?

Multiply the total bitrate (video plus audio) by the duration, then divide by 8 to turn bits into bytes. A 2 Mbps video that runs for 60 seconds is 2,000,000 × 60 ÷ 8 = 15,000,000 bytes, or 15 MB — plus a little for the container.

What bitrate fits a video under a size limit?

Divide the limit in bits by the duration in seconds, then subtract the audio bitrate. For 16 MB and 60 seconds: 16,000,000 × 8 ÷ 60 ≈ 2.13 Mbps in total, so about 2 Mbps for the picture with 128 kbps audio.

Why is my file slightly bigger than the calculation?

Containers like MP4 add indexes and headers, and encoders overshoot a target slightly. This calculator sets 3% aside for that, which is why its answers are a touch conservative.