How to use
- Enter the original width and height.
- Optionally enter a new width or height — the calculator returns the matching other side.
- Copy the CSS
aspect-ratiovalue to reserve space for images and videos.
Formula
New height = new width × original height ÷ original width. Example: resizing 1920 × 1080 to a width of 1280 gives a height of 720.
Setting aspect-ratio (or width and height attributes) on images prevents layout shift while the page loads, which improves Core Web Vitals (CLS).
Frequently asked questions
What aspect ratio is 1080 × 1920?
9:16 — the vertical format for stories, Reels, TikTok and YouTube Shorts.
What ratio is 1200 × 630?
About 1.91:1, the recommended size for Open Graph link previews.
Why use the CSS aspect-ratio property?
It reserves the correct space for media before it loads, avoiding layout shifts.

