Zahid Awais Get a free audit

Free aspect ratio calculator

Find the ratio of any image or video and calculate the missing width or height.

By Zahid Awais · Calculators · Free, private, no sign-up

Result

0Ratio
0Decimal
0New size

    Aspect Ratio Calculator: what it does and an example result

    The free aspect ratio calculator runs in your browser, needs no sign-up and never sends what you type anywhere.

    Quick answer

    An aspect ratio calculator finds the ratio of width to height and keeps it when resizing. 1920 × 1080 simplifies to 16:9. New height = new width × original height ÷ original width, so 1280 wide gives 720 high. Set width and height attributes on images so browsers reserve space and avoid layout shift.

    What is a aspect ratio calculator?

    An aspect ratio calculator is a tool that simplifies width and height into a ratio such as 16:9 by dividing both by their greatest common divisor. It then scales one side with new height = new width × height ÷ width to resize without stretching.

    How do you use the Aspect Ratio Calculator?

    How to use the Aspect Ratio Calculator: enter details, see the result and copy it
    Real screenshot of the Aspect Ratio Calculator with the steps marked.
    1. Enter the original width and height in pixels, or pick a common ratio preset.
    2. Choose whether you know the new width or the new height.
    3. Enter the new size you need.
    4. Read the simplified ratio, the decimal ratio and the missing dimension.
    5. Copy the CSS and HTML snippet so the image keeps its shape and avoids layout shift.

    How do you calculate aspect ratio?

    Divide width and height by their greatest common divisor: 1920 × 1080 divided by 120 is 16:9. For a decimal ratio, divide width by height, so 1920 ÷ 1080 = 1.78. In CSS you can apply it with the aspect-ratio property.

    How do I resize an image without stretching it?

    Keep the same ratio by calculating the second side: new height = new width × original height ÷ original width. A 1600 × 900 image resized to 800 wide must be 450 high. Changing only one side in an editor without locking the ratio causes distortion.

    Why do width and height attributes matter for SEO?

    Width and height attributes let the browser reserve the right space before an image loads, which helps prevent layout shift. web.dev recommends always including them on images and videos, and layout stability is part of Core Web Vitals.

    Quick reference

    RatioCommon sizesTypical use
    16:91920 × 1080, 1280 × 720YouTube video, hero images
    1.91:11200 × 628Open Graph and link preview images
    4:31024 × 768, 800 × 600Older screens, some blog images
    1:11080 × 1080Square social posts, product images
    9:161080 × 1920Stories, Shorts and Reels
    3:21500 × 1000Photography, DSLR images

    Worked example

    Example

    Example: a 1920 × 1080 banner has a greatest common divisor of 120, so the ratio is 1920 ÷ 120 : 1080 ÷ 120 = 16:9 (1.78). To fit a 1280 pixel wide column, new height = 1280 × 1080 ÷ 1920 = 720, so export it at 1280 × 720.

    Frequently asked questions

    What is aspect ratio?

    Aspect ratio is the proportional relationship between width and height, written as width:height. A 16:9 image is 16 units wide for every 9 units high, whatever its actual size in pixels.

    What aspect ratio is 1366 × 768?

    1366 × 768 simplifies to 683:384, which is about 1.78, very close to 16:9. The calculator shows the exact simplified ratio and the nearest common ratio for sizes like this that do not divide evenly.

    What is the best aspect ratio for blog images?

    Many sites use 16:9 or 3:2 for featured images, and 1.91:1 at 1200 × 628 pixels for social sharing images. Pick one ratio for all featured images so your layout stays consistent across the site.

    How do I convert a ratio to a decimal?

    Divide the first number by the second. 16:9 is 16 ÷ 9 = 1.78, 4:3 is 1.33 and 1:1 is 1.00. A decimal above 1 means landscape and below 1 means portrait.

    Does the calculator round results?

    Yes. The missing dimension is rounded to the nearest whole pixel because images cannot have fractional pixels. Rounding can change the ratio very slightly, which is normal and not visible to users.

    How do I use aspect ratio in CSS?

    Add aspect-ratio: 16 / 9 to the element and set only its width, and the browser calculates the height. For images, setting the width and height attributes in HTML gives the browser the same ratio automatically.

    Sources

    Facts checked against these official pages. Read how I check facts in my editorial policy.

    Related free tools

    All 104 tools

    Open Graph Preview

    An open graph preview is a mockup of the link card social platforms build from your Open Graph meta tags. The…

    Px to Rem Converter

    A px to rem converter is a calculator that turns absolute CSS pixels into relative rem units. The formula is…

    Want a full audit instead?

    Send your website and I will check it for you, free.

    Get my free audit
    Chat on WhatsApp
    Free updates

    Get new tools, guides and coupons first

    One short email when something new goes live: articles, free SEO tools, package updates, discounts and price alerts. No spam, unsubscribe in one click.