Crop Ratio Calculator
Cropping to a ratio raises a question with an exact answer: what is the biggest box of that shape this image can actually give? This finds it as a whole multiple of the ratio, so 16:9 comes out as a genuine 16:9 rather than something a pixel off after rounding, then gives you the offset to centre it and tells you what share of the original area survives.
What this generator does
Finds the largest whole multiple of your ratio that fits inside the image, giving a crop whose sides are exact multiples rather than approximately right. It then centres that box and reports the offset and the share of the original area retained.
How to use this tool
- Enter the pixel size of your image.
- Enter the ratio you want, as two numbers such as 16 and 9.
- Read the crop size and the offset that centres it.
- Check the area kept before deciding the crop is acceptable.
Understanding the controls
- Source width and height
- The image being cropped, in pixels. Both matter here — unlike a pure ratio calculation, the answer is in real pixels.
- Target ratio
- Two whole numbers such as 16 and 9, or 4 and 5. Reducing them first (6:4 rather than 3:2) makes no difference to the answer.
Common use cases
- Finding the largest square crop a photo will allow
- Preparing an image for a fixed-ratio slot without guessing
- Seeing how much of a photo a demanding ratio would discard
- Getting exact crop coordinates for a script or an editor
- Comparing two candidate ratios by how much each keeps
How this generator works
The largest crop is found by asking how many times the ratio fits across the width and how many times down the height, and taking the smaller of the two. Multiplying that scale by each side of the ratio gives a box that is exactly the requested shape by construction. Before display the crop is confirmed to be a whole multiple of both ratio parts, to sit entirely inside the image, and to be maximal — one step larger is checked and must not fit.
Randomness and fairness
Nothing here is random. The same image size and ratio always give the same crop.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- The crop is centred, which is the right default and the wrong choice whenever the subject is not in the middle — the offset is given so you can move it.
- Only whole-pixel crops of the exact ratio are returned, so an image whose size shares no useful factor with the ratio may lose a pixel or two more than strictly necessary.
- Enlarging is never considered: this only ever crops, so a ratio the image cannot fill stays uncropped in that direction.
- Content-aware cropping, faces and rule-of-thirds placement are all outside what a ratio calculation can know.
Privacy and your data
Nothing is uploaded and nothing leaves your browser. The dimensions you enter are not stored or included in analytics.
Related generators
- Aspect Ratio Fit CalculatorThe exact size an image becomes when contained inside a frame or made to cover it, with the letterbox bars and the cropped-off amounts measured.
- Contact Sheet Layout GeneratorWorks out the grid and the exact cell size for a sheet of thumbnails, with margins and gutters taken off first so the numbers actually fit the page.
- Masonry Layout GeneratorPacks tiles of varying heights into balanced columns and shows the result, with the uneven bottom edge that greedy packing genuinely leaves.
- Photo Challenge GeneratorA photo challenge to complete at a party or get-together.