About this tool
Find the exact crop width, height and offsets to convert footage or an image to a target aspect ratio, with an ffmpeg crop string.
The Crop to Aspect Ratio Calculator returns the largest rectangle inside a source frame that already matches a target aspect ratio, so the picture is reframed by cutting rather than stretching. If the source is wider than the target it keeps full height and sets crop width to height times the target ratio; if it is taller it keeps full width and sets crop height to width divided by the ratio. It also snaps the rectangle to even pixels for 4:2:0 encoding and prints the matching ffmpeg crop filter.
Open Crop to Aspect Ratio Calculator on AltFTool — it loads instantly in your browser.
Enter 'Source width (px)' and 'Source height (px)' — or tap a preset like 3840 x 2160 — and set the target ratio parts or a chip such as 9:16 vertical or 2.39:1 scope.
Choose 'Crop position' (Centre, Top / left, Bottom / right) and keep 'Snap to even pixels (4:2:0 video)' ticked for encoder-safe values.
Read the Crop rectangle size and offsets, the pixels-kept percentage, and copy the ffmpeg -vf crop line with 'Copy result'.
Shows the true crop size and the even-pixel version encoders accept
Centre, top/left or bottom/right crops with the matching x and y offsets
Percentage of pixels kept tells you when a crop is too aggressive
Keep the full 1080-pixel height and cut the width to 606 pixels, which is 1080 x 9/16 rounded down to the nearest even pixel, then centre it at x 656. That keeps only about 32% of the original pixels, so shoot or reframe with the vertical crop in mind where possible.
H.264 and H.265 in 4:2:0 store one chroma sample for each 2x2 block of luma, so odd widths, heights or offsets cannot be split cleanly and encoders either error out or shift the image. Rounding down to an even value loses at most one pixel per side.
Cropping itself is lossless because it only discards pixels, but the remaining area is smaller, so scaling it back up to the delivery resolution softens the picture. A 1:1 crop of UHD still leaves 2160x2160, which is more than enough for a 1080x1080 social post.
Use the crop filter in the form ffmpeg -i input.mp4 -vf "crop=w:h:x:y" output.mp4, where w and h are the crop size and x and y the offset from the top-left corner. Add -c:a copy to leave the audio untouched.
Add the Crop to Aspect Ratio Calculator widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/crop-to-aspect-ratio-calculator"
title="Crop to Aspect Ratio Calculator — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/crop-to-aspect-ratio-calculator?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>