Calculate dimensions that preserve a chosen width-to-height ratio.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
An aspect ratio is width divided by height; preserving it scales one dimension from the other without changing the quotient. Given a target box, the fit or crop policy decides which dimension is constrained.
Width: 1920 Height: 1080
Aspect Ratio Calculator ======================= Original dimensions: 1920 x 1080 Aspect ratio: 16:9 Decimal ratio: 1.7778 GCD: 120 Closest standard ratio: 16:9 (diff: 0.0000) Common sizes maintaining this ratio: 480 x 270 (0.25x) 960 x 540 (0.5x) 1440 x 810 (0.75x) 1920 x 1080 (1x) 2880 x 1620 (1.5x) 3840 x 2160 (2x) 5760 x 3240 (3x)
Video embeds, social-media exports, and responsive thumbnails calculate dimensions.