Geometric imaging laboratory
Dimension laboratory / 01
Aspect Ratio Calculator
Calculate image proportions, find missing dimensions, compare aspect ratios, and resize images without unnecessary stretching.
The rectangle is scaled with the minimum of panel-width / image-width and panel-height / image-height. It is not stretched to fill the panel.
Compare two ratios
Equality uses cross-multiplication of the simplified integers, not the rounded decimal. 1.78 on screen can hide different exact ratios.
Missing width or height
Width = height × A / B. Height = width × B / A. Rounding is shown beside the exact value because a nearest pixel can leave the ratio.
Twenty-four aspect ratio presets
Each preset loads real dimensions. 2560×1080 is 64:27 and 3440×1440 is 43:18; neither is exactly 21:9. Nominal A4 millimetres are 70:99, not an exact root-two ratio.
Image Scaling Calculator
A 50% linear scale keeps 25% of the pixels, which is a 75% reduction. This calculator does not invent a JPEG file size from the pixel count.
Resize Image Online
Decoding and encoding stay in this browser. Nothing is uploaded. GIF export uses one decoded frame. HEIC, TIFF, and camera RAW are not claimed as supported. Enlarging a photograph does not restore detail that was never recorded.
Or drag and drop an image here.
Original
Processed
Crop Image Online
Drag the rectangle or type coordinates. The overlay is not part of the downloaded file. Pointer position is converted with source = (pointer − origin) / preview scale.
Image Fit and Canvas Calculator
Contain uses the smaller scale so the whole image fits and the spare canvas becomes padding. Cover uses the larger scale and crops the overflow. These are different operations. This panel works without an upload.
Print Size Calculator
Print width in inches = pixels / PPI. Required pixels = inches × PPI. 300 PPI does not invent detail. Printer DPI counts ink dots and is not the same number as image PPI.
Presets: 72, 96, 150, 200, 240, 300, 600, or any custom PPI. A4 at 300 PPI is about 2480.31 × 3507.87 px; nearest integers are 2480 × 3508, and rounding up is 2481 × 3508.
Screen Size and Resolution Calculator
Width = diagonal × A / sqrt(A² + B²). Pixel density = diagonal pixels / diagonal inches. A mismatch between the physical ratio and the pixel ratio is reported instead of being treated as square pixels.
Resolution reference
1366×768 simplifies to 683:384, not 16:9. 3840×2160 and 4096×2160 are different grids. Names are not product recommendations.
Responsive Image Size Generator
Widths are encoded at the stated pixel width. A 640w descriptor is used only when the file is 640 pixels wide. The sizes attribute is a layout hint, not a guarantee about which file a browser downloads. Device pixel ratio and zoom also matter.
Device pixel ratio
Raster width = CSS width × device pixel ratio. A 400×300 CSS box at ratio 2 suggests an 800×600 file. Reading the browser value stays on this device and is not stored as a fingerprint.
Image export and format reference
PNG is a lossless browser encoding and keeps transparency. The quality slider is hidden for PNG because this page does not pretend the browser uses a JPEG-style quality for it. JPEG always flattens transparency onto the chosen background, white unless you change it. WebP is offered only when the browser actually encodes it. If the browser returns a PNG blob instead, the file is not saved with a WebP or JPEG name.
Encoded file size depends on the picture, the format, the quality parameter, and the encoder. It is measured from the Blob after export. A smaller file is not automatically a better picture, and a larger file is reported as an increase.
Twenty-four mathematical examples
Choose an example to load its values into the matching calculator.
Aspect ratio reference
For positive integers W and H, G is the greatest common divisor from the Euclidean algorithm. The simplified ratio is (W/G):(H/G). Decimals such as 8.5 and 11 are scaled to 85 and 110 before that division, which yields 17:22. Mixed physical units are converted to a common micrometre integer first. Pixels are not mixed with inches.
An exact integer grid for A:B is A×K by B×K. Inside a width of 1000, the largest 16:9 is 992×558. Relative error uses the exact fractions, with the target ratio as the reference.
Common image resizing mistakes
- Calling 1366×768 a mathematical 16:9. It is 683:384.
- Calling every ultrawide panel 21:9. 2560×1080 is 64:27 and 3440×1440 is 43:18.
- Treating a 50% width-and-height scale as a 50% pixel reduction. The pixel count falls by 75%.
- Expecting enlargement to reconstruct detail.
- Using Contain when the frame must be filled, or Cover when the whole subject must remain.
- Ignoring the ratio error after nearest-pixel rounding. 1000 × 2/3 is 666.666…, and 667 is not an exact 3:2.
- Equating PPI with printer DPI, or expecting 300 PPI to improve a small file.
- Reading a JPEG quality of 80 as “80% of the original picture.”
- Assuming cropped pixels shrink the file by the same percentage.
- Comparing ratios with a two-decimal display. Two values shown as 1.78 can still differ.
- Treating nominal 210×297 mm as exact √2.
- Mixing one side in inches with the other in centimetres without conversion.
Frequently asked questions
- What is an aspect ratio?
- It is the simplified relationship of width to height. 1920×1080 has greatest common divisor 120, so the ratio is 16:9.
- How do I calculate a missing side?
- Multiply the known side by the other part of the ratio and divide by the known part. A 16:9 width of 1280 has height 720.
- Does rounding keep the ratio?
- Not always. 1000 pixels at 3:2 has exact height 666.666…, and the nearest integer 667 changes the ratio slightly. The page shows the error.
- What is an exact-ratio multiple?
- Width A×K and height B×K. The largest 16:9 width that does not exceed 1000 is 992, with height 558.
- Are 2560×1080 and 21:9 the same?
- No. 2560×1080 simplifies to 64:27. 2520×1080 is an exact 21:9 example on this site.
- Is 1366×768 equal to 16:9?
- No. It simplifies to 683:384.
- Is A4 exactly root two?
- The nominal rounded size 210×297 mm simplifies to 70:99. That is not an exact irrational root-two ratio.
- What does a 50% scale do to pixels?
- Both sides become half, so the pixel count becomes one quarter. The reduction is 75%, not 50%.
- Can you predict a JPEG size from dimensions?
- No. Encoded size depends on the picture, format, quality parameter, and encoder. This site measures the Blob after export.
- What is the difference between contain and cover?
- Contain fits the whole image and leaves padding. Cover fills the frame and crops the overflow.
- What does stretch do?
- It scales width and height independently and can distort the picture. The resizer will not do that unless you explicitly allow stretching.
- Does enlarging an image add detail?
- No. New pixels are interpolated from the ones you already have.
- What is PPI?
- Image pixels per physical inch. A 3000×2400 file at 300 PPI prints at 10×8 inches.
- Is PPI the same as printer DPI?
- No. DPI describes printer dots. Setting 300 PPI does not improve the underlying file.
- How many pixels does A4 need at 300 PPI?
- The exact products are about 2480.31 and 3507.87. Nearest integers are 2480×3508. Rounding up, to stay at or above 300 PPI, is 2481×3508.
- How is screen size calculated?
- For a 27-inch 16:9 diagonal, width is 27×16/sqrt(337), about 23.53 inches, and height is about 13.24 inches, excluding the bezel.
- What does 3840×2160 on a 27-inch screen mean?
- About 163.18 PPI and a pitch near 0.156 mm. That number is not a grade of color or brightness.
- How do responsive variants work?
- Each target width is a real encoded file. The srcset descriptor uses the actual output width. The sizes attribute describes layout, and the browser may still pick another candidate.
- What is device pixel ratio?
- CSS pixels times the reported ratio suggest a raster size. A 400×300 box at ratio 2 suggests 800×600. Zoom can change the reported ratio, and it is not the panel’s physical size.
- Where are my images processed?
- In this browser. Files are not uploaded to a solver or a storage service.
- Which formats can I open?
- JPEG, PNG, WebP, a single GIF frame, and AVIF when the browser can decode it. HEIC, TIFF, and RAW are refused with an explanation if they cannot be decoded.
- Is metadata kept?
- Canvas export on this site does not write EXIF camera data, GPS, timestamps, or thumbnails back into the file. Orientation is baked into the pixels once.
- Do I need an account?
- No. There is no login, payment, or usage quota meant to sell a plan.
- Who publishes Ratio Canvas?
- Marquitta Terry, 1705 Vaughn St, Pine Bluff, AR 71603, [email protected]. It is an independent calculator, not a camera brand, lab, or print company.
About and contact
Ratio Canvas is an independent browser laboratory for proportions, resizing, crops, print math, and screen geometry. It is not affiliated with a camera maker, editor, printer, display brand, social platform, or photography association.
Marquitta Terry
1705 Vaughn St
Pine Bluff, AR 71603
[email protected]