Stellar angular diameter calculator
See how big a star looks from its size and how far away it is: the Sun, with a radius of 695700000 m seen from 149597870700 m, spans 1918.45545708 arcseconds, or 1918455.45708 milliarcseconds. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Radius
- 695,700,000
- Distance
- 149,597,870,700
- Diameter
- 1,391,400,000
- Angular diameter rad
- 0.0093009345
- Angular diameter mas
- 1,918,455.45708
- Angular diameter arcsec
- 1,918.45545708
Stellar angular diameter is the angle a star subtends on the sky as seen by an observer at a given distance. Under the small-angle approximation used throughout observational astronomy and interferometry, that angle in radians is simply twice the physical radius divided by the distance when both lengths share the same unit.
How the small-angle stellar angular diameter works
Start from the geometry of a star of physical radius R observed at distance d. Multiply the radian result by one hundred eighty over pi, then by three thousand six hundred, then by one thousand, to obtain milliarcseconds: that is the closed form this engine evaluates. Radius and distance must use the same length unit—metres with metres, AU with AU, or any consistent pair after you convert solar radii and parsecs yourself—because the ratio cancels the unit.
Distance must be a finite strictly positive number because division by zero is undefined and a non-positive scale is non-physical under this formula; zero and negative values fail with invalid input instead of returning Infinity. This page intentionally covers only the small-angle stellar path to milliarcseconds; the exact two-times-arctangent form for large disks, inverse physical-size-from-angle problems, and full interferometric visibility modelling are separate search intents and separate landings.
Where stellar angular diameter calculators show up in real work
Secondary-school and introductory university astronomy courses assign angular-size drills, convert stellar radii and distances into milliarcseconds, and compare nearby giants against the solar disk; a single trusted oracle speeds grading and demo setup. Interferometry and stellar-parameter notebooks often need a deterministic small-angle baseline before applying limb-darkening or visibility-model corrections. Science communicators turn catalogue radii and distances into human-readable milliarcsecond scales for public displays without re-deriving unit conversions each time.
Data pipelines that pre-filter resolved-star samples sometimes need a geometric angular-diameter column before heavier Bayesian or spectro-interferometric modules run. If you later need the exact arctangent angular size for large disks, physical size from a measured angular diameter, stellar parallax distance from an arcsecond angle, or telescope diffraction limits, treat those as separate search intents and landings rather than overloading this stellar angular diameter calculator page.
What you can do with it
Homework and exam answer keys
Compute θ_mas ≈ (2R/d)·(180/π)·3600·1000 for textbook stellar radii and distances so students and auto-graders share one closed-form ground truth in milliarcseconds.
Planetarium and outreach demos
Turn published stellar radii and distances into milliarcsecond angular diameters for exhibits, classroom widgets, and comparisons with the solar disk.
FAQ
What formula does this stellar angular diameter calculator use?
The small-angle relation θ_rad ≈ 2·R/d, converted to milliarcseconds with θ_mas = θ_rad · (180/π) · 3600 · 1000. Radius and distance must share the same length unit.
What happens if the distance is zero or negative?
Angular diameter θ ≈ 2R/d requires a strictly positive distance; zero or negative values are undefined or non-physical and are never turned into Infinity.
Should I enter radius or diameter?
Enter the physical stellar radius. The engine forms the diameter as 2·R internally. If your source quotes diameter, divide by two before calling.
Is this the same as the general angular size calculator?
No. That landing uses the exact 2·atan form and returns degrees, arcminutes, and arcseconds for general objects. This page is the stellar small-angle path with milliarcseconds as the primary unit—the search intent used in stellar catalogues and interferometry homework.
What does it cost?
The browser tool is free and runs locally.
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/astro/stellar-angular-diameter \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"radius":695700000,"distance":149597870700}'const res = await fetch("https://api.kit.forhosting.com/astro/stellar-angular-diameter", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"radius": 695700000,
"distance": 149597870700
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/astro/stellar-angular-diameter",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"radius": 695700000,
"distance": 149597870700
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/astro/stellar-angular-diameter", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"radius":695700000,"distance":149597870700}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"radius":695700000,"distance":149597870700}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/astro/stellar-angular-diameter", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"radius": 695700000,
"distance": 149597870700
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "astro.stellar_angular_diameter",
"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
How the small-angle stellar angular diameter works
The full linear diameter is two times R, and for small angles the angular diameter in radians is approximately that diameter divided by the distance: theta approximately equals two R over d. That linear approximation is excellent whenever the angle is much less than one radian, which is always true for stars as seen from Earth—even the Sun subtends only about half a degree, and typical stellar interferometry targets are milliarcseconds. The calculator is pure deterministic arithmetic: no random seeds, no wall-clock timestamps, no network calls, and no model drift, so identical inputs always produce identical JSON.
What you send and what you get back
Send two required finite numbers: radius for the stellar physical radius R, and distance for the observer-to-star distance d, both in the same length unit. Classic checks include a solar-scale radius of about six point nine five seven times ten to the eight metres at one astronomical unit recovering roughly one point nine one seven million milliarcseconds—the familiar half-degree solar disk—and a one-solar-radius star at one parsec recovering about nine point three milliarcseconds. Because the engine is pure parse arithmetic, latency stays sub-millisecond and results never depend on external catalogues or clocks. Missing fields, non-numeric strings, NaN, Infinity, zero or negative radius, and zero or negative distance fail with invalid_input and are not charged. On success the response echoes cleaned radius and distance, returns diameter as two times radius, angular_diameter_rad as the small-angle radian value, angular_diameter_mas as the primary milliarcsecond result, angular_diameter_arcsec as mas divided by one thousand, exposes rad_to_mas as the fixed conversion factor used, includes a units hint object, sets method to small_angle, and sets formula to the explicit small-angle string for audit trails. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.
Where stellar angular diameter calculators show up in real work
Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.
Integration use cases
Interferometry pipeline fixtures
Generate deterministic small-angle angular diameters from radius and distance before applying limb-darkening or visibility models in research notebooks.