Screen pixel density
Calculate display pixel density and aspect ratio from resolution and diagonal size.
Calculate a centred cover crop that fills a target rectangle while preserving image proportions.
Calculate a centred cover crop that fills a target rectangle while preserving image proportions.
((tw/sw+th/sh+abs(tw/sw-th/sh))/2)sw*((tw/sw+th/sh+abs(tw/sw-th/sh))/2) pxsh*((tw/sw+th/sh+abs(tw/sw-th/sh))/2) px(sw*((tw/sw+th/sh+abs(tw/sw-th/sh))/2)-tw)/2 px(sh*((tw/sw+th/sh+abs(tw/sw-th/sh))/2)-th)/2 pxAssumes square pixels, uniform scaling and a centred crop. Fractional pixels are geometric estimates; a scale above one requires upscaling and adds no image detail.
Results are rounded for display; calculations use unrounded values. Read our calculation methodology.
Calculate a centred cover crop that fills a target rectangle while preserving image proportions. Compare the two target-to-source ratios and use the larger. This fills the frame; the excess is cropped equally on opposing sides.
Compare the two target-to-source ratios and use the larger. This fills the frame; the excess is cropped equally on opposing sides.
| Input | Example |
|---|---|
Source width (px) sw | 4000 |
Source height (px) sh | 3000 |
Target width (px) tw | 1920 |
Target height (px) th | 1080 |
Assumes square pixels, uniform scaling and a centred crop. Fractional pixels are geometric estimates; a scale above one requires upscaling and adds no image detail.
Enter the displayed example values in their labelled units. Apply the formula before rounding; change one input at a time to compare scenarios.