Skip to content

Menu

Aspect Ratio Calculator

Calculate and convert aspect ratios with common presets and visual preview.

Runs entirely in your browserDesignFree, no sign-up
Loading tool

01What is Aspect Ratio Calculator?

You have a video that is 2560 by 1080 and a slot that is 1920 wide. How tall should it be? This calculator answers that, and tells you the real ratio behind any pair of pixel sizes. Type a Width and Height (it starts at 1920 x 1080). The tool finds the greatest common divisor of the two numbers with Euclid's algorithm and divides both by it. So 1920 x 1080 becomes 16:9, and 1440 x 900 becomes 8:5, the ratio most people call 16:10. Next to the ratio you get the decimal value to four places, 1.7778 for 16:9. You also get a ready CSS line such as aspect-ratio: 16 / 9, for the aspect-ratio property in the CSS Box Sizing Level 4 spec. A small preview box is drawn in the same proportions, scaled to fit 200 by 120 pixels. Six presets sit under the inputs: 16:9, 4:3, 1:1, 21:9, 3:2 and 9:16. Each one multiplies its ratio by 120, so 16:9 fills in 1920 x 1080 and 4:3 fills in 480 x 360. Click Resize by Width and enter a Target Width. The tool divides that width by the original ratio and rounds to the nearest whole pixel. Back to our video: 2560 x 1080 reduces to 64:27, and at 1920 wide the height comes out at 810. That gives a New size of 1920 x 810. One thing surprises people. Monitors sold as 21:9 are rarely exactly 21:9. 2560 x 1080 is 64:27 and 3440 x 1440 is 43:18, and this tool shows those exact numbers instead of the rounded marketing label. The same goes for 1366 x 768, which reduces to 683:384 rather than 16:9. Inputs must be whole numbers above zero. Type 12.5, a negative number or leave a box empty, and you get a short message asking for whole numbers instead of a quietly wrong ratio. There is no resize by height, so for a fixed height you'd swap the roles in your head. Rounding can also leave you a pixel off the exact ratio, for example 1366 x 768 scaled to 1280 wide gives 720. All the maths happens in the page script, so the sizes you type are not logged or sent anywhere.

Frontend developers and video editors who need a distortion-free size or a CSS aspect-ratio value from real pixel dimensions. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Aspect Ratio Calculator

  1. Enter the original Width and Height in pixels, or click a preset such as 16:9
  2. Read the simplified ratio, the decimal value and the aspect-ratio CSS line under Calculate Ratio
  3. Click Resize by Width and type a Target Width
  4. Read the New size, then use the reset button to go back to 1920 x 1080

03Worked examples

Input: 1920 x 1080, Resize by Width 1280
Result: 16:9 (1.7778), New size 1280 x 720
Input: 2560 x 1080, Resize by Width 1920
Result: 64:27 (2.3704), New size 1920 x 810
Ultrawides sold as 21:9 reduce to 64:27 at this resolution.
Input: 3440 x 1440, Resize by Width 2560
Result: 43:18 (2.3889), New size 2560 x 1072
Another 21:9 monitor size that isn't exactly 21:9. The height is rounded.
Input: 1366 x 768, Resize by Width 1280
Result: 683:384 (1.7786), New size 1280 x 720
Close to 16:9 but not equal, so the exact ratio stays large.
Input: 1440 x 900, Resize by Width 1280
Result: 8:5 (1.6000), New size 1280 x 800
8:5 is the same ratio usually written as 16:10.
Input: 12.5 x 10
Result: Enter a width and height as whole numbers greater than 0.
Decimals are rejected rather than cut down to 12.

04Common use cases

  • Working out the height of a 16:9 video embed that has to be exactly 640 pixels wide
  • Finding the true ratio of an odd camera or screenshot resolution before setting a crop
  • Getting the aspect-ratio CSS value for a responsive card from an image's real pixel size
  • Scaling a 2560 x 1080 ultrawide capture down to 1920 wide without stretching it
  • Checking whether 1366 x 768 and 1920 x 1080 really share a ratio before reusing one asset for both
  • Filling width and height attributes on an img tag so the browser reserves space before it loads

05Tips

  • The CSS aspect-ratio property replaces the old padding-bottom percentage trick for responsive boxes. Copy the line the tool shows straight into your stylesheet.
  • A ratio like 683:384 is a sign the size is only close to a common ratio. If you need a clean 16:9, adjust one side until the tool shows 16:9.
  • Setting width and height attributes on img tags lets the browser reserve the right space early, which helps keep Cumulative Layout Shift down.
  • Pick target widths that divide evenly by the reduced width (multiples of 16 for 16:9) and the height comes out exact with no rounding.

06Related concepts

CSS aspect-ratio, Cumulative Layout Shift, Responsive images, Viewport units.

Frequently Asked Questions

What is Aspect Ratio Calculator?

Aspect Ratio Calculator is a free, browser-based developer tool on AIDToolStack. Calculate and convert aspect ratios with common presets and visual preview. It requires no installation or sign-up and works entirely in your browser.

Is Aspect Ratio Calculator free to use?

Yes. No sign-up, no fees and no usage cap.

Does Aspect Ratio Calculator store my data?

No. It runs in your browser; nothing is uploaded.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe