Aspect Ratio Calculator
Simplify a width and height to an aspect ratio, scale dimensions with a ratio lock, and copy the CSS aspect-ratio value, with common presets.
Aspect Ratio Calculator
Ratio 16:9
Scale proportionally
Uses the ratio above (1.7778) to scale a single dimension.
Updated . Provided as is. Check the output before you rely on it in production.
How to use Aspect Ratio Calculator
- 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
Read the results
The simplified ratio, decimal ratio, and CSS aspect-ratio value appear immediately below the inputs as you type.
- 3
Lock and scale
Toggle the lock to preserve the ratio, then change one dimension and the other adjusts automatically to stay proportional.
- 4
Copy the CSS
Press Copy CSS to put the aspect-ratio declaration on your clipboard, then paste it straight into your stylesheet.
Questions and answers
What is an aspect ratio calculator?
Is the aspect ratio calculator free to use?
Does this tool store the values I enter?
How does the lock-ratio toggle work?
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
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.