ποΈ Aspect Ratio Calculator β Resize Width and Height
Enter a width and height to simplify the ratio, or lock a ratio and solve for the missing side. Useful for crops, embeds and responsive layouts.
What this tool does
The aspect ratio calculator simplifies a width and height into the smallest whole-number ratio and converts between ratio and dimensions. Given 1920 by 1080 it returns 16:9, and given a target ratio plus one side it solves for the missing side.
It also reports the decimal width divided by height, which is the number CSS expects in an aspect-ratio property. That makes it useful for video embeds, image crops, responsive placeholders and social media templates.
When to use it
- Checking that a video or image matches a platform's required ratio.
- Finding the correct height for a 16:9 frame at a given width.
- Converting a decimal aspect ratio from a design file back into a clean ratio.
- Planning responsive image placeholders before assets are ready.
How it works
- Enter pixel width and height, then press Simplify ratio to reduce them by their greatest common divisor.
- To resize, set the target ratio and one side, then press Height from width or Width from height.
- The decimal form is width divided by height, which CSS uses as the aspect-ratio value.
Worked example
Enter 1920 and 1080 and simplify to get 16:9. With the ratio set to 16:9 and a width of 1280, solving for height returns 720. The decimal field shows 1.7778, which can be used directly as aspect-ratio: 16 / 9 in CSS.
- 1920 by 1080 simplifies to 16:9.
- A 16:9 frame that is 1280 wide is 720 high.
- 1080 by 1080 simplifies to 1:1.
Accuracy and limitations
- Width and height are treated as plain numbers, so mixing units such as pixels and centimetres produces a meaningless ratio.
- Simplification is exact only for integer inputs; decimal dimensions are rounded before the greatest common divisor is applied.
- The tool calculates dimensions but does not crop, resize or inspect an actual image file.
Privacy and data handling
The arithmetic is performed locally in your browser. No dimensions or design files are uploaded or stored.
Frequently asked questions
How is the ratio simplified?
Both sides are divided by their greatest common divisor, so 1920:1080 becomes 16:9. The visual proportion does not change.
Can I use this for video crops?
Yes. 16:9 is common for widescreen video, 9:16 for vertical stories, 4:5 for portrait posts and 1:1 for square crops.
Are the dimensions sent anywhere?
No. The arithmetic runs locally in the browser.
Why does 1920 by 1080 simplify to 16:9?
Both values divide exactly by 120, giving 16 and 9. The ratio describes the shape, not the absolute pixel count.
Can I use the decimal value in CSS?
Yes. A decimal such as 1.7778 can be written directly as aspect-ratio, although the 16 / 9 form is easier to read.
Related tools
More Design tools βColor Contrast Checker
Measure WCAG contrast between two hex colors for text and interface graphics.
HSL to Hex Converter
Convert between HSL and hexadecimal color formats privately.
CSS Gradient Generator
Generate CSS linear and radial gradients with live preview and copy-ready code.
Color Palette Generator
Generate five hex tints and shades from a single base color.