Object Fit Calculator
Calculate contain, cover, none, or scale-down image placement.
- Free
- No sign-up
- Runs in your browser
- Nothing uploaded
Scope: The calculation uses supplied dimensions and position percentages without loading, rendering, or inspecting an image.
Workbench
Inputs stay on this page. Press Ctrl or ⌘ + Enter to run.
How to use Object Fit Calculator
Fill in the fields:
- Source width: 0.001 to 1,000,000.
- Source height: 0.001 to 1,000,000.
- Container width: 0.001 to 1,000,000.
- Container height: 0.001 to 1,000,000.
- object-fit: contain, cover, none, scale-down.
- Horizontal object position (%): 0 to 100.
- Vertical object position (%): 0 to 100.
Press “Calculate object fit”.
Copy the result, or download it as object-fit.json.
About this tool
Calculate contain, cover, none, or scale-down image placement.
Geometry only. No image is loaded, decoded, cropped, or rendered.

