Fit an image down to a maximum width and height without distortion.
The smaller of the two width or height ratios is chosen as the scale, capped at one to avoid enlarging, then original pixels are multiplied by it. Aspect-safe downscaling keeps thumbnails sharp and undistorted, meeting platform limits like YouTube's 1280x720 cover without breaking a crop.
Thumbnail Size Fitter
Scale = min(maxWidth / width, maxHeight / height, 1)
Scale = min(maxWidth / width, maxHeight / height, 1) The smaller of the two width or height ratios is chosen as the scale, capped at one to avoid enlarging, then original pixels are multiplied by it.
Aspect-safe downscaling keeps thumbnails sharp and undistorted, meeting platform limits like YouTube's 1280x720 cover without breaking a crop.
This calculator takes 4 inputs: Source width, Source height, Max width, Max height. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.