ForHosting KIT · Science

Declination from horizontal coords

An object due south at altitude 50°, seen from latitude 40°, has a declination of 0°: it sits on the celestial equator. Enter the altitude, the azimuth measured from north through east and your latitude to recover the declination. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Altitude
50
Azimuth
180
Latitude
40
You get
Azimuth normalized
180 deg
Declination
0
Sin declination
0
Precision
10

This declination from horizontal coordinates calculator recovers an object's equatorial declination from its observed altitude and azimuth together with the observer's geographic latitude. Amateur astronomers, planetarium software authors, and students of spherical astronomy often measure or simulate a sky position in the local horizontal frame and need the matching equatorial declination without writing a full coordinate pipeline. The engine inverts the standard transform sin of delta equals sin of altitude times sin of latitude plus cos of altitude times cos of latitude times cos of azimuth, where azimuth is measured from north through east. Computation is pure finite trigonometry with no network calls, no sampling, and no date-dependent ephemeris.

What horizontal coordinates mean and how declination is recovered

The horizontal system places the observer at the origin of a local sky: altitude is the angle of an object above the mathematical horizon, positive toward the zenith and negative toward the nadir, so it always lies between minus ninety and plus ninety degrees. Azimuth is the compass bearing of the object's vertical circle; this calculator uses the common astronomical convention that zero degrees points due north, ninety degrees due east, one hundred eighty degrees due south, and two hundred seventy degrees due west.

Latitude is the observer's geographic latitude on Earth or another sphere, positive in the northern hemisphere and negative in the southern, and must stay inside the closed interval from minus ninety to plus ninety degrees. Equatorial declination is the angular distance of the object north or south of the celestial equator, analogous to latitude on the sky. The three quantities are linked by the spherical law of cosines applied to the astronomical triangle formed by the zenith, the north celestial pole, and the object.

Expanding that identity yields the compact sine formula sin of delta equals sin a sin phi plus cos a cos phi cos A. Taking the inverse sine returns declination in the principal range from minus ninety to plus ninety degrees, which is exactly the range celestial objects occupy. This page solves only that inverse step: it does not compute right ascension, hour angle, or local sidereal time, and it does not apply atmospheric refraction.

When you need a reproducible declination from a known horizontal fix and a known latitude, the pure analytic path here is enough for homework, contest problems, and deterministic software tests without standing up an ephemeris service.

Where this conversion helps in practice

Classrooms introduce the astronomical triangle early in spherical astronomy courses; students need a fast check that a meridian transit at altitude fifty degrees from latitude forty degrees yields zero degrees declination, or that a north-pointing fix at altitude equal to the latitude recovers near-polar declination. Planetarium and observing-app authors convert user-pointed altitude and azimuth into equatorial labels for overlays without shipping a full reduction library.

Field observers who record telescope encoder readings in altitude and azimuth can recover declination for log books when they already know site latitude and do not yet need right ascension. Contest and exam generators require a deterministic oracle that rejects illegal latitudes instead of silently clamping them, so graders can mark out-of-range site data as invalid.

Classroom spherical-astronomy checks

Verify declination from textbook altitude, azimuth, and site latitude, including meridian and polar sanity cases.

Observing logs and encoder conversion

Convert altitude–azimuth telescope readings into equatorial declination for night logs when site latitude is known.

How do I compute declination from altitude, azimuth, and latitude?

Send finite altitude ([-90, 90]°), azimuth (degrees from north through east), and latitude ([-90, 90]°).

What happens if latitude is out of range?

Observer latitude must lie in the closed interval [-90, 90] degrees; values outside that range are rejected and not billed.

Which azimuth convention does the calculator use?

North through east: 0° = north, 90° = east, 180° = south, 270° = west.

Does this return right ascension as well?

No. Right ascension needs local sidereal time or hour angle in addition to the horizontal fix.

Does it correct for atmospheric refraction?

No. It uses the altitude exactly as you enter it and applies no atmospheric refraction. If your altitude is a raw reading close to the horizon, correct it first and then enter the corrected value to get the declination.

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.

POSThttps://api.kit.forhosting.com/astro/declination-horizontal

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.

curl -X POST https://api.kit.forhosting.com/astro/declination-horizontal \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"altitude":50,"azimuth":180,"latitude":40}'
{
  "altitude": 50,
  "azimuth": 180,
  "latitude": 40
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "astro.declination_horizontal",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Input contract, azimuth convention, and error behaviour

POST a JSON body with three required finite numbers: altitude in degrees between minus ninety and plus ninety, azimuth in degrees with any finite value allowed, and latitude in degrees strictly inside or on the ends of minus ninety to plus ninety. Preferred field names are altitude, azimuth, and latitude; accepted aliases include alt, a, elev, and elevation for altitude; az, A, and azi for azimuth; and lat, phi, and observer_latitude for latitude so spreadsheets and query strings can reuse the same contract. Azimuth values outside zero to three hundred sixty are accepted and reported both as supplied and as azimuth_normalized folded into the half-open interval from zero inclusive to three hundred sixty exclusive. Latitude outside the closed polar range fails with invalid_input and a message that latitude is out of range; altitude outside its range fails similarly. Missing fields, empty strings, non-finite tokens, and scientific-notation strings that do not parse as finite decimals also fail with invalid_input and are not billed. If floating-point evaluation of the sine formula produces an absolute value larger than one beyond a tiny clamp tolerance, the request is rejected as inconsistent horizontal coordinates rather than forcing an invalid arcsin. On success the body includes the echoed altitude, azimuth, and latitude; azimuth_normalized; declination in degrees; sin_declination; precision; method tag declination_horizontal; the formula string; unit deg; and azimuth_convention north_through_east so clients never guess the bearing zero point.

Where a declination-from-horizontal API earns its keep

The free browser path on this page uses the same mathematical module as the API, so homework demos and production workers never disagree on a meridian check or a polar-star sanity case. Pair the tool with hour-angle or right-ascension helpers when you later need the full equatorial pair, and keep this endpoint focused on the single inverse that search traffic asks for by name.

Deterministic test fixtures

Pin rounded declination values in CI for horizontal-to-equatorial transform modules across languages.

What does the declination from horizontal coordinates calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →