ForHosting KIT · Developer Utilities

Hour angle from LST and right ascension calculator

This hour angle calculator converts Local Sidereal Time and an object's right ascension into local hour angle.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter both coordinates as decimal hours between 0 inclusive and 24 exclusive. The calculator subtracts right ascension from LST, converts the difference at 15 degrees per hour, and normalizes the answer to the range from 0 inclusive to 360 exclusive. That result indicates how far the object has rotated westward from the observer's local meridian, using the conventional positive full-circle representation.

What local hour angle tells you

Local hour angle describes an object's angular position relative to the local celestial meridian. An object with an hour angle of zero degrees is on that meridian. As sidereal time advances, the hour angle increases, expressing how far the sky has rotated since the object crossed the meridian. This calculator uses the standard relationship in which local hour angle equals Local Sidereal Time minus right ascension. Because both inputs are entered in decimal hours, their difference is multiplied by 15 degrees per hour. The returned value is normalized into a complete positive circle from 0 inclusive to 360 exclusive. For example, a result near 15 degrees means the object is about one sidereal hour west of the meridian, while a result near 345 degrees is equivalent to minus 15 degrees and places it about one sidereal hour east of the meridian. The normalized form is convenient for software, telescope calculations, plotting, and comparisons that expect nonnegative angular coordinates.

How to enter LST and right ascension

Provide Local Sidereal Time and right ascension as decimal hours, not as degrees and not as sexagesimal text. A value such as 10 hours 30 minutes becomes 10.5 hours, while 8 hours 15 minutes becomes 8.25 hours. Each input must be a finite number at least zero and strictly less than 24. The endpoint 24 is excluded because it denotes the same position as zero hours and would create two representations for one coordinate. Negative values, values of 24 or greater, numeric strings, missing fields, infinity, and nonnumeric values are rejected as invalid input. Make sure the Local Sidereal Time applies to the observer's longitude and intended observation instant; this calculator does not derive LST from a civil date, clock time, or location. Likewise, use right ascension expressed in the same celestial reference context required by your workflow. The operation is deliberately focused: it converts two already prepared equatorial-coordinate quantities into one local angular relationship.

Reading the normalized degree result

The result is returned in the field hour_angle_degrees. Subtraction happens before normalization, so the calculator handles wraparound across zero hours correctly. Suppose LST is 1 hour and right ascension is 23 hours. Their direct difference is minus 22 hours, or minus 330 degrees; normalization produces 30 degrees, the equivalent positive angle. This convention avoids negative output and makes the result suitable for systems that represent rotations on a 0-to-360-degree circle. If your astronomy application instead expects a signed hour angle, values greater than 180 degrees can be converted to the equivalent signed angle by subtracting 360 degrees. Thus 345 degrees corresponds to minus 15 degrees. No rounding rule is imposed beyond ordinary JavaScript numeric arithmetic, so fractional inputs retain useful precision through the multiplication. The function does not account for atmospheric refraction, precession, nutation, polar motion, or topocentric parallax; those concern how the input coordinates are established, not the hour-angle subtraction itself.

Prepare a telescope pointing calculation

Convert an object's right ascension and the observer's known LST into a normalized local hour angle for the next coordinate step.

Check meridian position

Determine whether a target is on, east of, or west of the local celestial meridian from two prepared sidereal coordinates.

Validate astronomy software

Use deterministic wraparound cases to test coordinate pipelines that convert hour-based values into angular degrees.

What formula does the calculator use?

It computes Local Sidereal Time minus right ascension, multiplies the hour difference by 15 degrees per hour, and normalizes the result to at least 0 and less than 360 degrees.

Should I enter hours, degrees, or hours-minutes-seconds text?

Enter both values as decimal hours. Convert minutes by dividing them by 60 and seconds by dividing them by 3600 before using the calculator.

Why is 24 hours rejected?

Twenty-four hours is the same circular coordinate as zero hours. Requiring values below 24 keeps each valid coordinate in one unambiguous representation.

Why do I get a large positive angle instead of a negative angle?

The output uses a normalized full-circle convention. To obtain an equivalent signed angle, subtract 360 degrees when the returned value is greater than 180 degrees.

Does this calculate Local Sidereal Time from my date and longitude?

No. Local Sidereal Time must already be known. This capability only computes its angular difference from the object's right ascension.

What does an API calculation cost?

Each API request costs $0.002. The same deterministic calculation can also run free in the browser.

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/hour-angle-from-lst

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/hour-angle-from-lst \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"local_sidereal_time_hours":10.5,"right_ascension_hours":8.25}'
{
  "local_sidereal_time_hours": 10.5,
  "right_ascension_hours": 8.25
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "astro.hour_angle_from_lst",
  "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.

Read the full KIT documentation →