GIF Size Calculator (estimate, fit under a limit, ffmpeg commands)

Choose the size, frame rate, length and colours to estimate how big a GIF will be. Then find settings that fit under a size limit, and copy commands to make the GIF.

How big will my GIF be?

GIF vs WebP vs MP4

Make it fit a size limit

Many chat apps, forums and README pages cap GIF uploads. Type the limit and get settings that should land under it.

Make the GIF with ffmpeg

Two steps: build the best 256 (or fewer) colours for this clip, then draw every frame with them. It runs on your own computer; this page never sees your file.


How it works

Pick what's in the clip, then the width, shape, frames per second, length and number of colours. The estimate uses typical squeeze rates for each kind of picture, so treat it as a guide: the real file usually lands within the range shown. Flat screen recordings squeeze far better than camera footage, which is why the same size and length can be 300 KB or 8 MB.

A GIF stores every frame as a grid of palette numbers (up to 256 colours) and squeezes it with LZW, a compression method from 1984 that is good at long runs of the same colour and bad at the fine noise in real-life video. Dithering scatters dots to fake missing colours: gradients look smoother, but the noise makes the file bigger. Storing only what changes (frame optimisation) means each new frame only saves the part that moved, which helps a lot for screen recordings.

Size grows with width × height × frames, so halving the width roughly quarters the file, while dropping from 15 to 10 fps saves about a third. Cutting colours from 256 to 64 helps less than you might think, often 15 to 25%.

GIF vs WebP vs MP4 shows the same clip in newer formats. A looping, muted MP4 is often 10 to 30 times smaller and sharper, and animated WebP sits in between. Use a GIF when the place you're posting only accepts GIFs.

Make it fit tries every sensible mix of width, frame rate and colours and keeps three that land under your limit with 5% to spare. Tap one to load it into the estimate and the commands.

The ffmpeg commands use the two-step palette method: palettegen picks the best colours for this clip, then paletteuse draws the frames with them. That gives far cleaner GIFs than a one-line conversion. The optional gifsicle --lossy step trades a little grain for a much smaller file. Background: why GIFs are so big and how to shrink one and GIF vs MP4 vs WebP.

Questions

How big is a 5 second GIF?

At 480 pixels wide and 10 fps, roughly 250 KB for a screen recording, around 1.5 MB for a cartoon and 4 to 7 MB for camera footage. What's in the picture matters as much as the size.

Why is my GIF so much bigger than the video?

GIF compression dates from 1984 and stores every frame almost whole, with no motion prediction. A modern MP4 only stores what moves, so the same clip is often 10 to 30 times smaller.

How do I get a GIF under 8 MB?

Lower the width first (480 or 400 pixels), then the frame rate (10 to 12 fps), then trim the length. Cutting colours helps a little. The calculator finds combinations that fit.

Does reducing colours make a GIF smaller?

Yes, but less than you'd expect: going from 256 to 64 colours usually saves 15 to 25%. Width, frame rate and length matter much more.

What is the best way to make a GIF with ffmpeg?

Use two steps: palettegen to build a palette for the clip, then paletteuse to apply it, with fps and scale filters before both. The tool writes the commands for you.

Is my file uploaded?

No. You never pick a file here. The page only does arithmetic in your browser, and the ffmpeg commands run on your own computer.

Related tools

Guides