Aspect ratio calculator

Enter a width and height to get the simplified ratio, or lock a ratio and change one side to get the other. Each result lists the Instagram, Facebook, LinkedIn, X and other image sizes with the same ratio.

Aspect ratio

4:5

0.8 · portrait

Social media sizes with this ratio

    Runs in your browser. Nothing you type is sent to PostBoost.

    Use this tool from code

    The same tool is a free API call, no account needed. It also works with our 9 SDKs and the MCP server.

    curl
    curl -X POST https://postboost.co/app/api/tools/aspect-ratio-calculator -H 'Content-Type: application/json' -d '{"width":1080,"height":1350}'

    API docs for this tool SDK quickstart

    Last verified:

    Sources:

    What an aspect ratio is

    An aspect ratio is the shape of an image: its width compared with its height, written as width:height. Two images with the same ratio have the same shape at any size, so 1080×1350 and 720×900 are both 4:5. Social networks size their feed slots by ratio, which is why the same photo can look full in one feed and cropped in another.

    Find the ratio of a size

    Type a width and a height and the calculator reduces them to the smallest whole numbers with the same shape. It also gives the decimal ratio, which is handy for comparing shapes that do not reduce to tidy numbers, and tells you whether the image is landscape, portrait or square.

    Find the missing side

    When you resize an image, you usually know one side and the ratio. Tick Lock the ratio, then type the new width: the height follows. If the exact height is not a whole number of pixels, the calculator rounds it and shows the exact value, so you know how far off the result is.

    Match it to a social media size

    Below each result is a list of social media image sizes with the same ratio, taken from our image sizes page. When nothing matches exactly, it lists the nearest sizes instead, so you can see which placement will crop your image the least. To crop and resize the image itself, use the image resizer on the same page, then schedule the post with PostBoost.

    How to use

    1. Enter the width and height of your image in pixels, or pick a social media size.
    2. Read the simplified ratio, the decimal ratio and the orientation.
    3. Tick Lock the ratio, then change the width or the height to get the other side at the same ratio.
    4. Check the social media sizes listed below the result to see where the image fits without cropping.

    FAQ

    How do I calculate an aspect ratio?

    Divide the width and the height by their greatest common divisor. 1920×1080 divides by 120 into 16:9, and 1080×1350 divides by 270 into 4:5. The calculator does this for you and also shows the decimal ratio (width divided by height).

    How do I get the height for a given width and ratio?

    Multiply the width by the ratio's height and divide by its width. At 16:9, a width of 1280 gives 1280 × 9 ÷ 16 = 720. When the result is not a whole number, the calculator rounds it to the nearest pixel and says so: 1200 wide at 1.91:1 is 628.27, rounded to 628.

    Which aspect ratio should I use for social media posts?

    Portrait 4:5 (1080×1350) is the common feed choice on Instagram, Facebook and Threads. Square 1:1 works almost everywhere. Landscape 16:9 suits X in-feed images and YouTube thumbnails, and 9:16 is for stories, TikTok and Shorts. The full list is on our social media image sizes page.

    Why does 1200×628 show as 300:157?

    Because that is its exact simplified ratio. Sizes such as 1200×628 and 1200×630 are close to 1.91:1 but not equal to it, so the calculator shows the exact ratio, the decimal (1.9108) and the nearest social media sizes.

    What does lock the ratio do?

    It keeps the current ratio fixed. Change the width and the height follows, or change the height and the width follows, which is what you need when you resize an image without stretching it.

    Is my data sent anywhere?

    No. The calculation runs in your browser and your numbers are never sent to PostBoost. The same maths is available on the PostBoost Free Tools API and MCP server if you want to call it from code or an AI agent.

    Related

    Try PostBoost free

    API, webhooks and MCP on every plan, including Free. No credit card required.