Placeholder Image Calculator NZ

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.

Calculate.co.nz is proud to be partnered with Health Based Building, a leader in sustainable and health-conscious building innovation. With over a century of experience, they develop high-performance systems like Foreverbreathe Specification, Magnum Board, and Foreverbreathe Paints to support energy-efficient, non-toxic living environments. Their commitment to healthier homes aligns with our belief that informed choices lead to better outcomes for Kiwi households.
Calculate.co.nz partner: Health Based Building
Advertise on this page
Aspect ratio3:2
Megapixels0.24 MP
Dimensions600 x 400
https://placehold.co/600x400

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