aspect-ratio-calculator
An aspect ratio calculator computes pixel dimensions for any width/height ratio β given a width, find the height that maintains the ratio (or vice versa). Common ratios: 16:9 (HD video, YouTube, modern TVs), 9:16 (Stories, TikTok, Reels), 4:3 (older TVs, PowerPoint default), 3:2 (DSLR photos), 1:1 (Instagram square), 2.35:1 (cinematic widescreen), 21:9 (ultrawide monitors), 4:5 (Instagram portrait). The ZTools Aspect Ratio Calculator handles bidirectional conversion (W from H or H from W), preset ratios, and GCD reduction (e.g. 1920Γ1080 β 16:9).
Use casesβ
Video resizing for platformsβ
Source video is 4K (3840Γ2160 = 16:9). Target for TikTok needs 9:16. Calculator gives the crop dimensions instantly.
Image responsive sizingβ
Hero image must be 16:9 across breakpoints. Pick a max width (e.g. 1280); calculator gives the matching height (720).
CSS aspect-ratio preservationβ
Modern CSS supports aspect-ratio: 16/9; older browsers need a padding-bottom hack. Calculator gives the exact percentage (56.25%).
Print / display sizingβ
Photo print at 8Γ12 in (3:2). Want to fit a 4Γ5 frame? Calculator shows you'll lose the top/bottom strips.
How it worksβ
- Pick or enter ratio β Preset (16:9, 4:3, 1:1, etc.) or custom W:H.
- Enter known dimension β Width OR height β the tool computes the missing value.
- Get result β Pixel dimension at the input value, with optional rounding to even number for video codec friendliness.
- Optional reduce β Reduce arbitrary dimensions to a simple ratio (1920Γ1080 β 16:9). Uses GCD.
Examplesβ
Input: 16:9 ratio + width 1920
Output: Height = 1080. Native 1080p HD.
Input: 9:16 ratio + width 1080
Output: Height = 1920. TikTok / Stories / Reels native.
Input: Reduce 1920Γ1080
Output: 16:9 (GCD 120, divides both).
Input: 4:5 ratio + width 1080
Output: Height = 1350. Instagram portrait max.
Frequently asked questionsβ
Why aren't my dimensions even numbers?
Some ratios produce non-integer heights (e.g. 1080Γ608.4 for 16:9 from 1080 wide). Most video codecs require even numbers β round to the nearest even (608 or 610).
What's the difference between "16:9" and "1.78:1"?
Identical β 16/9 = 1.778. Cinematic ratios are often given as decimals (1.85:1, 2.35:1, 2.39:1); video/display ratios as integer ratios.
How does CSS aspect-ratio compare?
Modern browsers (96%+ in 2026) support aspect-ratio: 16/9 directly β no hack needed. Older browsers (IE11) need padding-bottom: 56.25% on a wrapper. Calculator emits both.
Does it handle non-integer ratios?
Yes β 21:9 ultrawide is actually 21.5:9 = 2.39:1 in cinema terminology. The calculator accepts decimal inputs.
Why does my screenshot at 16:9 look stretched on a 4:3 monitor?
Old 4:3 monitors stretch 16:9 content. Either letterbox (black bars) or accept the stretch. Modern monitors handle aspect-correct display automatically.
Can it suggest crops to change aspect ratio?
Yes β give source dimensions and target ratio; tool shows crop margins on each side.
Tipsβ
- Always round video dimensions to even numbers β codecs require it.
- Stick to standard ratios where possible β custom ratios cause player bugs and platform rejections.
- For social: 9:16 (Stories/Reels), 1:1 (IG feed), 4:5 (IG portrait β most screen space), 16:9 (YouTube).
- For print, keep aspect ratio of frame in mind β common photo paper is 3:2; common frame is 4:5 β loses content on every print.
- Use CSS
aspect-ratioover padding-bottom hack β cleaner code, ships in every modern browser.
Try it nowβ
The full aspect-ratio-calculator runs in your browser at https://ztools.zaions.com/aspect-ratio-calculator β no signup, no upload, no data leaves your device.
Last updated: 2026-05-06 Β· Author: Ahsan Mahmood Β· Edit this page on GitHub