Zero Signup ToolsFree browser tools

Calculator Tools

Aspect Ratio Calculator

Find the aspect ratio of any width and height, resize while keeping the ratio, and fit images into a container with contain or cover.

Calculator mode

Type a width and a height to see the simplified aspect ratio, decimal, percent, and CSS values.

Common ratios

Dimensions

Preview at scale

How to use

  1. Pick a calculator mode at the top: Find ratio from size, Resize keeping a ratio, or Fit into a box.
  2. Click a common ratio preset (16:9, 4:3, 21:9, 1:1, 9:16, and more) to seed the inputs, or type your own values.
  3. In Find ratio, type a width and height to see the simplified ratio, decimal, percent, and CSS values. In Resize, edit either width or height and the other side updates to keep the ratio. In Fit into a box, choose contain or cover to see how a source lands inside a container.
  4. Use any Copy button to copy the dimensions, ratio, or CSS rule.

About this tool

Aspect Ratio Calculator solves three jobs in one: find the aspect ratio from any width and height, resize a source while keeping a ratio locked, and fit a source into a container using contain (letterbox) or cover (fill, crop) scaling. The find-ratio mode reduces dimensions to their simplest form using a greatest common divisor (so 1920 by 1080 collapses to 16:9), prints the decimal, the inverse decimal, the percentage form, the modern CSS aspect-ratio property, and the legacy padding-top responsive embed value. The resize mode lets you pick a ratio (with one click on common presets like 16:9, 4:3, 21:9, 1:1, 9:16, 3:2, or the 1.91:1 Open Graph card ratio) and edit either the width or the height; the other side updates instantly so you can match a target frame, thumbnail, banner, social image, or video export. The fit-into-box mode takes a source size and a container size, applies contain or cover math, and returns the fitted width, fitted height, and the scale factor so you know exactly how the source lands in the box. A live preview rectangle shows the shape at the current dimensions. All math runs entirely in your browser, so the sizes you type stay on your device. Useful for designers picking export sizes, video editors matching social aspect ratios, web developers writing CSS aspect-ratio rules, photographers cropping for print, and anyone trying to keep things from getting stretched.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsCalculator Tools