Placeholder Image Size Calculator

This tool generates a placeholder image of any size you specify, along with its aspect ratio, megapixel count and a ready-to-use URL, for use while designing and building web pages. When laying out a website or app before the real images are ready, designers and developers use placeholder images, plain coloured rectangles of the right dimensions, to fill the space and check the layout. Working out the aspect ratio of a given width and height, and producing a placeholder of exactly those dimensions, is a small but frequent task. This tool handles it. You enter the width and height in pixels, and the calculator shows a live preview of a placeholder image at that size, the simplified aspect ratio, the total megapixels, and a placeholder image URL you can copy straight into your markup. The results update as you type, so you can experiment with dimensions and immediately see the shape. Use it to mock up image areas while designing, to check how a given size looks, to find the aspect ratio of a planned image, or to grab a placeholder URL for a prototype. The aspect ratio is the width to height in lowest terms, found by dividing both by their greatest common divisor, so 1920 by 1080 simplifies to the familiar 16 by 9. The megapixel figure, width times height divided by a million, gives a sense of the image's resolution. The placeholder URL points at a public placeholder service that returns a grey image of the requested dimensions, ideal for prototypes, though you would replace it with real images for production. Seeing the preview, ratio and URL together makes it quick to plan image areas and keep your layouts consistent.

Aspect ratio3:2
Megapixels0.24 MP
Dimensions600 x 400
-

Aspect ratio is width:height in lowest terms. Megapixels = width x height / 1,000,000. The URL uses a public placeholder service; replace with real images for production.

How it works

The aspect ratio is found by dividing the width and height by their greatest common divisor, giving the ratio in lowest terms. The megapixels are the width times the height divided by one million. The placeholder URL is built from the dimensions using a public placeholder image service, and a live preview of that image is shown.

Worked example

For a width of 600 and height of 400 pixels, the greatest common divisor is 200, so the aspect ratio simplifies to 3 by 2. The megapixel count is 600 times 400 over a million, which is 0.24 megapixels. The placeholder URL points to a grey 600 by 400 image, shown in the preview below.

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

© 2019 to 2026 Calculate.co.nz. All rights reserved.