Video file size calculator
A video's size is its bitrate times its length, plus the audio and a little MP4 overhead. Work out how big a video will be, or the bitrate and picture size that fit a size limit, with a two-pass ffmpeg command for the answer.
Formulas from our video tool's own planning code; checked with real encodes on 28 and 29 October 2026 (ffmpeg 8.1.2).
Two calculators: the first turns a bitrate and a length into a file size, the second runs the other way, from a size limit (8, 10, 16, 25, 50 or 100 MB, or any number) to the bitrate, the largest picture size that still looks acceptable, and the ffmpeg command that makes the file. Both run in your browser: nothing you type is sent anywhere, and the page sets no cookies and stores nothing.
Disclosure: Quarrywise, the publisher of this site, built and sells the Apify Actor mentioned near the end. The calculators use the same constants as that Actor, and everything on this page works without it.
The calculators need JavaScript. Without it, the formulas below give the same answers with a pocket calculator.
How big will my video be?
Enter bitrates of 0 or more (not both 0) and a length such as 1:30.
- File size
- Same size in MiB
- In bytes
What bitrate fits my size limit?
Enter a limit from 0.5 to 100,000 MB and a length such as 1:30.
- Video bitrate
- Picture size
- Quality
- Audio
- Total budget
- Expected file
Two-pass ffmpeg command (H.264, AAC, index first)
Replace input.mp4 with your file. Check the size afterwards; if it is over, lower -b:v by a few percent and run both lines again.
HDR phone video (HDR10, HLG or Dolby Vision, common on iPhones) comes out washed out with this command: it converts to 8-bit without tone mapping. Turn off HDR video in the camera settings, or export a standard (SDR) copy first.
The second calculator makes the same plan our video Actor makes before it encodes: the same 3% safety margin, the same audio steps and the same bits-per-pixel floors for choosing the picture size. The Actor stops at 1080p; the calculator goes up to the original's size. The Actor also checks the finished file and redoes it if it is over; the calculator cannot, so for small files (under 250 kb/s of video) it warns you to check.
Tested: predicted size against real encodes
We looped our 12-second 1080p, 30 fps sample video five times into a 60-second clip (30.9 MB, mono AAC audio), entered 1:00 and four limits into the second calculator, and ran the two-pass commands it gave, unchanged, with ffmpeg 8.1.2:
| Limit | Calculator's plan | Predicted | Actual | Actual vs predicted | Against the limit |
|---|---|---|---|---|---|
| 2 MB | 190 kb/s video, 240p (426 × 240), 64 kb/s audio | 1,940,000 bytes | 1,986,087 bytes | +2.4% | 0.7% under |
| 8 MB | 902 kb/s video, 540p (960 × 540), 128 kb/s audio | 7,760,000 bytes | 7,780,036 bytes | +0.3% | 2.7% under |
| 16 MB, WhatsApp encoding | 1,937 kb/s video, 720p (1280 × 720), 128 kb/s audio, Main profile, no B-frames | 15,520,000 bytes | 15,550,162 bytes | +0.2% | 2.8% under |
| 1.3 MB, the smallest limit the calculator accepts for 1:00 | 99 kb/s video, 240p (426 × 240), 64 kb/s audio | 1,261,000 bytes | 1,321,813 bytes | +4.8% | 1.7% over |
| 1.3 MB, run again at 89 kb/s (10% lower) | 89 kb/s video, 240p (426 × 240), 64 kb/s audio | 1,183,696 bytes | 1,275,940 bytes | +7.8% | 1.9% under |
The margin: on the first three tests the prediction was within 3% of the real
size, and the 3% safety margin built into the second calculator kept those files under their limit.
For the smallest files that does not hold. At the smallest limit the calculator accepts, the file came out 4.8% above
the prediction and 1.7% over the limit (with the same sample cut to 36 seconds, 0.8 MB came out
2.3% over). Two things add up: the MP4 index of a minute-long file with audio took about 66 KB,
where the estimate allows 36 KB, and below about 150 kb/s x264 can overshoot the bitrate it is given
by about 10%. Run 10% lower, both files fit (1.9% and 1.8% under). Our clip also ran 60.1 seconds
rather than 60, which alone adds 0.17%. Different footage can land further off, which is why the
commands are two-pass and why you should check the size before you upload. ffprobe confirmed the 16 MB file is H.264 Main profile with no B-frames.
Both passes took 2 to 7 seconds per file on a desktop PC.
The formulas
Units, and which is which
- kb/s (also written kbps): 1,000 bits per second. 8 bits make a byte.
- MB (megabyte): 1,000,000 bytes. Upload limits and our calculators use this.
- MiB (mebibyte): 1,048,576 bytes. Windows File Explorer and some apps count in this unit but still label it "MB", so the same file shows about 4.6% smaller there.
Size from bitrate
size in bytes = (video kb/s + audio kb/s) × 1,000 ÷ 8 × seconds + MP4 overhead
size in MB = bytes ÷ 1,000,000
size in MiB = bytes ÷ 1,048,576
MP4 overhead (an estimate, the same heuristic our Actor uses, not a figure from the MP4 specification): the file's index grows with every video frame and every audio packet.
MP4 overhead = 4,096 + seconds × (fps × 10 + 47 × 5 if there is audio)
That is 4 KB of headers, about 10 bytes per video frame and about 5 bytes per AAC audio packet; AAC at 48 kHz makes about 47 packets a second (48,000 samples ÷ 1,024 per packet). For a minute at 30 fps with audio that is 36,196 bytes, under 0.2% of a 25 MB file, but a real share of a tiny one.
Worked example: 10 minutes at 8,000 kb/s video and 128 kb/s audio, 30 fps. The streams are (8,000 + 128) × 125 × 600 = 609,600,000 bytes, the overhead 4,096 + 600 × (300 + 235) = 325,096 bytes, in all 609,925,096 bytes: 609.9 MB, or 581.7 MiB.
Bitrate for a size limit
total kb/s = (limit in MB × 1,000,000 × 0.97 − MP4 overhead) × 8 ÷ seconds ÷ 1,000
audio kb/s = 64 if total < 300, 96 if total < 800, else 128 (0 without audio)
video kb/s = total kb/s − audio kb/s
The 0.97 is the safety margin: two-pass H.264 lands within a few percent of the bitrate you ask for, sometimes above it. Below 40 kb/s of video nothing is watchable at any size.
Worked example: 25 MB for a 60-second, 30 fps video with audio. The overhead is 36,196 bytes, the total (24,250,000 − 36,196) × 8 ÷ 60 ÷ 1,000 = 3,229 kb/s, the audio 128, so the video gets 3,101 kb/s.
Then the picture size: bits per pixel
bits per pixel = video kb/s × 1,000 ÷ (width × height × fps)
The calculator tries the original size, then each standard size below it (1440p, 1080p, 720p, 540p, 480p, 360p, 240p), and takes the first one where each pixel of each frame gets at least 0.035 bits, the point below which H.264 visibly falls apart. If even 240p gets less than 0.0315 bits (0.035 × 0.9), it says the limit is too small and gives the smallest limit that would work. Frame rates above 30 fps are reduced to 30 first, as our Actor does by default. In the 25 MB example, 3,101 kb/s at 1080p30 is 0.050 bits per pixel: enough for 1080p, in the fair band.
These thresholds are our engine's own values, tuned by eye on real footage, not a published standard. Talking heads and screen recordings look fine a little below them; sport, confetti and handheld footage need more.
Will it look OK? The quality bands
| Band | Bits per pixel (H.264) | What it means |
|---|---|---|
| Low | below 0.0315 | Blocky and smeared; the calculator refuses it. |
| Fair | 0.0315 to 0.063 | Watchable; soft in fast motion and fine detail. |
| Good | 0.063 to 0.2 | A clean picture for sharing. |
| Ceiling | above 0.2 | More bits buy nothing visible, so the calculator caps the bitrate there and the file comes out smaller than the limit. |
The same bands as video bitrates, for 16:9 at 30 fps, rounded up to the next 10 kb/s:
| Picture size | Picked from (0.035) | Good from (0.063) | No visible gain above (0.2) |
|---|---|---|---|
| 1080p (1920 × 1080) | 2,180 kb/s | 3,920 kb/s | 12,450 kb/s |
| 720p (1280 × 720) | 970 kb/s | 1,750 kb/s | 5,530 kb/s |
| 540p (960 × 540) | 550 kb/s | 980 kb/s | 3,120 kb/s |
| 480p (854 × 480) | 440 kb/s | 780 kb/s | 2,460 kb/s |
| 360p (640 × 360) | 250 kb/s | 440 kb/s | 1,390 kb/s |
| 240p (426 × 240) | 110 kb/s (watchable from 97) | 200 kb/s | 620 kb/s |
For how many minutes fit into 8, 10, 25, 50 and 100 MB at each picture size, see the table in our guide to compressing a video to 8, 10, 25, 50 or 100 MB.
You have the number: now make the file
Free routes, enough for most people
- On a phone: trim the clip in your gallery app, or record at 1080p instead of 4K. WhatsApp compresses video when you send it anyway; our WhatsApp guide covers its limits and how to send a large video in the app.
- ffmpeg (free, Windows, macOS, Linux): paste the command from the second calculator. Two passes are what make the size predictable.
- HandBrake (free desktop app): set the video to an average bitrate, enter the video kb/s from the calculator, turn on multi-pass encoding, and set the picture size in the Dimensions tab.
For one video, or a handful now and then, these are all you need. The compression guide walks through each, with tested commands.
When our Actor helps: many videos, an API, a checked fit
The calculator gives a plan; it cannot see your file. Real footage can land a few percent over, and someone has to check and redo it. Our Apify Actor, Compress Video to Size: Under 10 MB, 25 MB or Any, does that part for you, which is worth paying for when you have many videos or need it inside an automation (Make, n8n, Zapier or the Apify API) where you cannot run ffmpeg:
- it makes this plan from the video's real length and frame rate, encodes in two passes (H.264), checks the finished file and redoes it smaller if it is even one byte over, up to three encodes;
- it returns the exact size and a
within_limitflag to branch on, and a download link; - a limit too small for a watchable picture is refused and not charged, with the smallest limit that would work;
- its
whatsapp-16preset encodes H.264 Main profile without B-frames for the WhatsApp Business API; - HDR phone videos (HDR10, HLG, Dolby Vision) are tone-mapped to standard range, so they do not come out washed out.
Price, pay per event: $0.01 per video saved under the limit plus $0.002 per second of output ($0.12 a minute), and $0.002 more per second when the input is above 1080p. A one-minute clip to 25 MB costs $0.13. Videos that cannot meet the limit or fail are free. A video already under the limit is copied into MP4 for $0.01 when it can be kept as it is (for example H.264 in 8-bit with AAC or MP3 audio); otherwise, such as an HEVC or HDR phone clip, it is re-encoded at the per-second price. Apify adds its standard start event, a fraction of a cent per run.
To be fair about price: if you can run ffmpeg where your videos are, the command above costs nothing. Our guide on fitting a recording under 25 MB in n8n shows the Actor inside an automation.
See the video compressor on the Apify Store
FAQ
Is a "25 MB" limit 25,000,000 or 26,214,400 bytes?
Services rarely say. Aim under 25,000,000 bytes (the decimal reading) and the file fits either way. That is why the calculators work in decimal MB and show MiB alongside.
Why did my file come out smaller than the limit?
By design: the plan aims 3% under the limit so the encoder's overshoot does not push the file over. It also comes out smaller when the budget is above the ceiling for the picture size, since more bits would buy nothing visible.
How big is a one-minute 1080p video?
It depends on the bitrate, not the resolution alone. At the good-quality threshold for 1080p30 (about 3,920 kb/s plus 128 kb/s audio) a minute is about 30 MB. Our 12-second sample, a typical 1080p H.264 clip at about 4,100 kb/s, is 6.2 MB, so about 31 MB a minute. Phones often record at higher bitrates; enter yours in the first calculator.
Does 60 fps need twice the bitrate?
No, frames close together are much alike. Our engine counts frames above 30 fps at half weight. The second calculator outputs at most 30 fps, which gives the picture more bits at a fixed size.
What about AV1 or HEVC?
The calculators and commands are for H.264, which plays everywhere. AV1 needs roughly 40% fewer bits for the same picture (our engine's AV1 floor is 0.021 bits per pixel), but many apps and older devices cannot play it.
Quarrywise is independent and isn't affiliated with or endorsed by WhatsApp, Meta, HandBrake, Apify or the other services named here.
Sources
- Constants: our Actor's planning code (
plan.py: MP4 overhead, 0.97 margin, audio steps, bits-per-pixel floor, bands and ceiling, picture-size ladder) and encoder settings (encoder.py: x264 preset medium, WhatsApp Main profile without B-frames) - AAC framing of 1,024 samples per packet: ISO/IEC 14496-3
- ffmpeg documentation (the
-passoption) - HandBrake: constant quality versus average bit rate
- Compress Video to Size on the Apify Store