Object height from magnification calculator
Divide the image height by the magnification to get the object back: an image of −12 mm at magnification −3 comes from an object 4 mm tall, and the image is inverted. Works for lenses and spherical mirrors. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Runs in your browser. Free, unlimited — your data never leaves this page.
This object height from magnification calculator rearranges the standard linear magnification equation to recover an unknown object height from a measured or stated image height. Enter the signed image height and the non-zero linear magnification, and it returns the signed object height, its absolute physical size, and the image orientation. Magnification is dimensionless, so the result automatically uses the same length unit as the image height. The calculation is deterministic and works for both lenses and spherical mirrors that follow the usual transverse magnification convention.
Rearranging the linear magnification equation
Linear, lateral, or transverse magnification compares the height of an optical image with the height of the object that produced it. The defining equation is m equals image height divided by object height, commonly written m = hi/ho. When image height and magnification are known, multiply both sides by object height and then divide by magnification to obtain ho = hi/m.
This calculator performs exactly that rearrangement. For example, an image height of negative twelve millimeters with magnification negative three produces an object height of positive four millimeters. Substitution checks the result: negative twelve divided by positive four is negative three.
The units require no conversion because magnification is a ratio of two heights and therefore has no unit. If image height is supplied in millimeters, object height is in millimeters; if it is supplied in centimeters, the result is in centimeters.
Using signs, orientation, and absolute height correctly
Optics problems often treat vertical height as a signed coordinate. A point above the principal axis may be positive and a point below it negative. With that convention, a negative linear magnification means the image is inverted relative to the object, while a positive magnification means it is upright.
The solver preserves the signs in the equation rather than silently discarding them. If image height and magnification have the same sign, the computed object height is positive; if their signs differ, the computed object height is negative. Orientation is derived from the magnification itself: negative is inverted and positive is upright.
A magnification of zero is rejected because ho = hi/m would require division by zero and cannot produce a finite object height. Image height may be zero; with any valid non-zero magnification, that yields an object height of zero in the ideal mathematical model. Inputs must be finite numbers, so blank values, NaN, and Infinity are rejected as invalid input.
When a textbook uses a different sign convention, translate its stated values into a mutually consistent signed image height and magnification before calculating, then interpret the returned sign under that same convention.
Checking results in homework, labs, and optical design
A reliable object-height calculation should be easy to verify. First divide the entered image height by the returned object height; the result should reproduce the entered magnification. Second compare absolute sizes.
When the absolute magnification is greater than one, the absolute image height should be larger than the absolute object height. When it is between zero and one, the image should be smaller. When its absolute value equals one, both physical heights should match.
These checks catch swapped quantities, lost minus signs, and inconsistent units. In a classroom, the calculator can complete a ray-diagram problem after image height or magnification has been measured from a scale drawing. In an optics lab, it can recover a target height from a projected image height and an experimentally measured magnification.
In machine vision or projection work, it can provide a quick first-order object-size estimate when image-plane scale and system magnification are already known. The model assumes a single linear magnification value adequately describes the mapping, so it does not correct lens distortion, perspective, tilted planes, thick-lens effects, or position-dependent magnification. Those effects require calibration or ray tracing.
What you can do with it
Solve optics homework
Recover the unknown object height after a lens or mirror problem provides image height and signed linear magnification.
Analyze a laboratory projection
Estimate a target's height from a measured projected-image height and an experimentally determined magnification.
Check imaging-system scale
Convert a known image-plane height back to first-order object size when a calibrated linear magnification is available.
FAQ
What does a negative magnification mean?
Under the usual transverse convention, negative magnification means the image is inverted relative to the object. The solver preserves all supplied signs.
What formula finds the object height from magnification?
Object height equals image height divided by magnification. You can check the answer by dividing the image height by the result: −12 divided by 4 gives back the magnification of −3.
What unit does the object height come out in?
The same unit as the image height you entered. Magnification is a ratio of two heights and has no unit, so millimetres stay millimetres and centimetres stay centimetres.
Why is a magnification of zero not accepted?
Because the calculation divides by the magnification, and dividing by zero gives no finite height. An image height of zero is fine, though: with any valid magnification it gives an object height of zero.
Can I enter a telescope's or microscope's magnifying power?
Not directly. The tool expects the signed linear magnification of a lens or spherical mirror. Telescope power, angular magnification, digital zoom or print enlargement percentages must first be turned into that ratio.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/optics/object-height-from-magnification \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"image_height":-12,"magnification":-3}'const res = await fetch("https://api.kit.forhosting.com/optics/object-height-from-magnification", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"image_height": -12,
"magnification": -3
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/optics/object-height-from-magnification",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"image_height": -12,
"magnification": -3
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/optics/object-height-from-magnification", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"image_height":-12,"magnification":-3}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"image_height":-12,"magnification":-3}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/optics/object-height-from-magnification", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"image_height": -12,
"magnification": -3
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "optics.object_height_from_magnification",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Rearranging the linear magnification equation
Keep the input unit in your notes because the numeric API cannot infer whether a value represents millimeters, centimeters, meters, or another length unit. The response labels the unit relationship as same_as_image_height rather than inventing a unit. This capability is for linear magnification produced by a lens or spherical mirror. It does not use telescope power, microscope angular magnification, digital zoom, or photographic enlargement percentages unless those quantities have first been converted to a signed linear magnification ratio.
Using signs, orientation, and absolute height correctly
The response also includes absolute_object_height, which is the non-negative physical size and is often the value requested by a laboratory worksheet or design specification. Decimal strings are accepted for practical form and API use, but arbitrary text and objects are not.
Checking results in homework, labs, and optical design
The browser version is free and uses the same pure solver as the API. Automated successful requests cost $0.002 per item, while invalid input is rejected before a useful result is returned. For reproducible records, store both the numeric image height and its length unit alongside the returned JSON.
Technical questions
What formula calculates object height from magnification?
Use object_height = image_height / magnification, which is the rearranged definition m = image_height / object_height.
Why can magnification not be zero?
The calculation divides by magnification. Zero would make object height undefined, so the request is rejected with invalid_input.
What unit does the object height use?
It uses the same length unit as image_height because linear magnification is dimensionless. Record that unit with your input.
What does the calculator cost?
The browser calculator is free. A successful API request costs $0.002 per item; invalid input is rejected.