Surface brightness calculator
This surface brightness calculator converts an extended object's integrated apparent magnitude and angular area into a mean brightness per square arcsecond.
Run — free
It is useful for galaxies, nebulae, comets, and other sources whose light covers a visible patch of sky rather than behaving like a point source. Enter the total magnitude measured in one photometric band and the corresponding area in square arcseconds. The result uses the astronomical logarithmic magnitude scale and reports magnitudes per square arcsecond for that same band.
What surface brightness tells you
Total magnitude describes all light received from an object after that light has been combined into one measurement. It does not say whether the light is concentrated into a compact core or spread across a large, faint region. Mean surface brightness adds that missing spatial context by distributing the integrated light over the object's apparent angular area. The result is expressed in magnitudes per square arcsecond, commonly written mag/arcsec². Because the magnitude scale runs backward, a smaller numerical surface-brightness value represents a brighter patch of sky, while a larger value represents a fainter one. This distinction matters when comparing galaxies with similar total magnitudes but very different apparent sizes. A compact galaxy can have a bright mean surface brightness and be easy to detect against the sky, while a diffuse galaxy with the same total magnitude may be difficult to see. The calculator reports a mean across the supplied area; it does not describe variations between a bright nucleus, spiral arms, and a faint outer halo.
How the calculation works
The calculator applies μ = m + 2.5 log₁₀(A), where μ is mean surface brightness in magnitudes per square arcsecond, m is the integrated apparent magnitude, and A is angular area in square arcseconds. The area must refer to the same region used to obtain the integrated magnitude. Increasing the area while holding total magnitude fixed makes the mean surface brightness numerically larger and therefore fainter, because the same flux is spread over more sky. An area of exactly one square arcsecond leaves the magnitude unchanged. The input magnitude may be negative, zero, or positive as long as it is a finite number; astronomical magnitudes are not restricted to positive values. The area must be finite and strictly greater than zero because the logarithm of zero or a negative quantity is undefined for this calculation. The returned value is rounded to six decimal places for stable, reusable results. No extinction, inclination, cosmological dimming, point-spread correction, or background subtraction is introduced automatically.
Choosing a consistent angular area
A reliable result depends more on defining the measurement region consistently than on typing extra decimal places. Use an angular area derived from the same aperture, contour, segmentation map, or geometric boundary used for the total magnitude. For an elliptical region with full major and minor axis diameters a and b, the projected area is πab/4; if the values are semiaxes, the area is πab. Convert the result to square arcseconds before submitting it. Do not enter an area in square arcminutes without converting: one square arcminute equals 3,600 square arcseconds, and the logarithmic formula makes that unit error substantial. Keep the photometric band consistent as well. A total magnitude measured through a V filter produces a V-band surface brightness, while an r-band magnitude produces an r-band value. When comparing catalog entries, check whether their areas use isophotal, effective, aperture, or model boundaries. Different definitions can yield different mean values even when each calculation is mathematically correct. State the adopted region alongside the result so another observer can reproduce the comparison.
What you can do with it
Compare diffuse galaxies
Separate compact and low-surface-brightness systems that have similar integrated magnitudes but occupy different angular areas.
Assess an observing target
Estimate whether a nebula or galaxy is likely to stand out from the sky background before planning an observation.
Check catalog calculations
Recompute a published mean surface brightness from its magnitude and stated aperture area for a consistent comparison.
FAQ
What formula does the calculator use?
It uses μ = m + 2.5 log₁₀(A), with angular area A measured in square arcseconds.
Why does a larger magnitude mean a fainter surface brightness?
Astronomical magnitudes use an inverse logarithmic scale, so numerically larger magnitude values correspond to less flux.
What happens if the angular area is zero or negative?
The request returns an invalid-input error because a non-positive area has no valid logarithm in this formula.
Does the result correct for extinction or cosmological dimming?
No. It calculates directly from the supplied magnitude and area, so apply any required scientific corrections before or after the calculation.
How much does an API calculation cost?
Each API request costs $0.002; the browser version can run the same deterministic calculation locally.
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/astro/surface-brightness \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"total_magnitude":10.5,"angular_area_arcsec2":120}'const res = await fetch("https://api.kit.forhosting.com/astro/surface-brightness", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"total_magnitude": 10.5,
"angular_area_arcsec2": 120
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/astro/surface-brightness",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"total_magnitude": 10.5,
"angular_area_arcsec2": 120
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/astro/surface-brightness", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"total_magnitude":10.5,"angular_area_arcsec2":120}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"total_magnitude":10.5,"angular_area_arcsec2":120}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/astro/surface-brightness", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"total_magnitude": 10.5,
"angular_area_arcsec2": 120
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "astro.surface_brightness",
"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. |