Aspect Ratio Calculator
Work out a ratio, resize without stretching and find exact pixel sizes.
How to use the Aspect Ratio Calculator
- Type a width and height to see the simplified ratio and the nearest standard shape.
- Pick a ratio, or keep the one just found, and type a new width or height.
- The other side is calculated for you, rounded to whole pixels if you like.
- Click an exact size from the list, or copy the CSS for a box of that shape.
About this tool
The aspect ratio is the shape of a rectangle: how wide it is compared to how tall. Getting it right matters whenever you resize a photo, export a video, design a banner or embed a frame on a web page. Change one side without the other and the picture stretches; pick the wrong ratio and a platform crops the edges you cared about.
This calculator reduces any width and height to its simplest form, so 1920 by 1080 becomes 16:9 and 1080 by 1350 becomes 4:5. When a size is close to a standard shape but not exact, it says which and by how much, which explains odd black bars or slight crops. Type a new width or height and the other side is solved instantly.
Video encoders and image tools prefer sizes where both sides are whole numbers, ideally divisible by 8. The list of exact sizes shows such sizes for the chosen shape, so you can pick one that scales without rounding errors. The CSS section gives both the modern aspect-ratio property and the older padding trick.
Frequently asked questions
How do I calculate an aspect ratio?
Divide the width and height by their greatest common divisor. For 1920 by 1080 the divisor is 120, giving 16:9. The calculator does this for you, including sizes with decimals.
How do I find the height for a new width?
Multiply the new width by the ratio's height and divide by its width. For 16:9 at 1280 pixels wide: 1280 × 9 ÷ 16 = 720. Type the width in the resize section to get it straight away.
Is 1366 × 768 really 16:9?
Not exactly. It simplifies to 683:384, which is about 0.06% wider than 16:9. Screen makers rounded it to friendlier numbers. The calculator shows this as effectively 16:9.
Which ratio should I use for social media?
Square (1:1) and portrait 4:5 work well in feeds, 9:16 suits full-screen stories and short videos, and about 1.91:1 is common for link previews. Platforms change their crops, so check their current guidance.
Is anything I type stored or sent?
The last width and height are remembered in your browser for next time. Nothing is sent to a server.