Skip to content

Aspect Ratio Calculator

Presets
Simplified Ratio
16:9
Decimal Ratio
1.7778
CSS
aspect-ratio: 16 / 9

Scale Proportionally

Uses the ratio above (1.7778) to scale a single dimension.

Height: โ€”
Width: โ€”

What This Tool Does

Aspect Ratio Calculator is built for deterministic developer and agent workflows.

Calculate aspect ratios and proportionally scale width/height, with common presets and a CSS aspect-ratio output.

Use How to Use for execution steps and FAQ for constraints, policies, and edge cases.

Last updated:

This tool is provided as-is for convenience. Output should be verified before use in any production or critical context.

Agent Invocation

Best Path For Builders

Browser workflow

Runs instantly in the browser with private local processing and copy/export-ready output.

Browser Workflow

This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.

/aspect-ratio-calculator/

For automation planning, fetch the canonical contract at /api/tool/aspect-ratio-calculator.json.

How to Use Aspect Ratio Calculator

  1. 1

    Enter your dimensions

    Type a width and height into the two input fields, or click a preset button like 16:9 or 4:3 to fill them in for you.

  2. 2

    Read the results

    The simplified ratio, decimal ratio, and CSS aspect-ratio value appear immediately below the inputs as you type.

  3. 3

    Lock and scale

    Toggle the lock to preserve the ratio, then change one dimension and the other adjusts automatically to stay proportional.

  4. 4

    Copy the CSS

    Press Copy CSS to put the aspect-ratio declaration on your clipboard, then paste it straight into your stylesheet.

Frequently Asked Questions

What is an aspect ratio calculator?
It reduces a width and height to their simplest ratio, such as 1920x1080 to 16:9, and also gives you the decimal ratio plus a ready-to-paste CSS aspect-ratio value.
How do I use the aspect ratio calculator?
Enter a width and height or pick a preset like 16:9. The simplified ratio, decimal ratio, and CSS output update instantly, and the scale section resizes one dimension proportionally.
Is the aspect ratio calculator free to use?
Yes. It runs in your browser with no account and no usage caps, so you can compute as many ratios as you need without restrictions.
Does this tool store the values I enter?
No. Every calculation happens locally in your browser. Nothing you type is uploaded, logged, or sent to any server.
How does the lock-ratio toggle work?
When locked, the calculator remembers the current ratio. Change the width and the height recalculates to match, so resized images and videos keep the same proportions.