Aspect Ratio Calculator

Calculate and convert aspect ratios for images and videos. Input dimensions to find the perfect width and height ratio for your projects.

In your browser Updated 05/2026

Find missing image or video dimensions, simplify any width × height to its lowest aspect ratio, or resize media to fit a target ratio with contain or cover modes.

Common ratios

Scale dimensions while keeping a ratio
Type a width or height - the other dimension updates automatically.
Simplify width × height to its lowest ratio
×
-
Resize to a target ratio (fit or cover)
-
-
What is an aspect ratio?

An aspect ratio expresses the relationship between width and height as two numbers separated by a colon, such as 16:9 or 1:1. It defines the shape of an image, video, or screen independently of its actual size in pixels - useful when you need to resize media without distortion.

Aspect ratio formula

New height = New width × (Ratio H ÷ Ratio W)

Example: a 16:9 image at 1920 px wide has height = 1920 × (9 ÷ 16) = 1080 px.

Common aspect ratios
  • 16:9 - Standard widescreen - YouTube, modern monitors, HDTV.
  • 9:16 - Vertical video - TikTok, Instagram Reels, YouTube Shorts.
  • 4:3 - Classic TV and old monitor format, still common in print.
  • 1:1 - Square - Instagram feed posts and profile pictures.
  • 21:9 - Cinematic ultrawide - used in movies and ultrawide monitors.

Use this tool from your AI agent

Free JSON API and Model Context Protocol (MCP) server. No signup, no API key, CORS open. Designed for Claude, ChatGPT, Cursor, scripts and frontend apps.

curl -X POST https://mate.tools/api/v1/aspect-ratio.php \
  -H "Content-Type: application/json" \
  -d '{"width":1920,"height":1080}'
import urllib.request, json

req = urllib.request.Request(
    "https://mate.tools/api/v1/aspect-ratio.php",
    data=json.dumps({"width":1920,"height":1080}).encode(),
    headers={"Content-Type": "application/json"},
)
with urllib.request.urlopen(req) as r:
    print(json.load(r))
const r = await fetch("https://mate.tools/api/v1/aspect-ratio.php", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({"width":1920,"height":1080}),
});
console.log(await r.json());

Add to claude_desktop_config.json (Claude Desktop), ~/.cursor/mcp.json (Cursor), or any other MCP-compatible client:

{
  "mcpServers": {
    "mate-tools": {
      "command": "npx",
      "args": ["-y", "@mate-tools/mcp-server"]
    }
  }
}
API documentation OpenAPI 3.1 npm 60 req/min · 600 req/hour · 1 MB body cap

Frequently Asked Questions

Divide the width by the height, then express the result as the simplest ratio. For example, 1920 ÷ 1080 = 1.778, which simplifies to 16:9. The simplify section above does this for you automatically.

Contain shrinks or grows the image so the entire content fits inside the target box without cropping - letterboxing may appear. Cover fills the entire target box, cropping any excess on the longer side. Contain preserves the full image, cover preserves the framing.

Both numbers share a greatest common divisor of 120: 1920 ÷ 120 = 16 and 1080 ÷ 120 = 9. Aspect ratios are always expressed in the smallest whole numbers possible.

Use 9:16 for vertical video on TikTok, Reels, Shorts, and Stories. Use 1:1 for Instagram feed posts. Use 16:9 for YouTube horizontal videos. Use 4:5 for portrait Instagram feed posts when you want maximum vertical space.

Not without either cropping (cover mode) or adding padding (contain mode). Stretching to a new ratio without one of those approaches will distort the content. Use the resize section above to see exactly what dimensions you need for either approach.