Moon age in days calculator for any date
On 25 July 2026 the Moon is about 10 days old, counted from the previous new moon. Enter any date and see where it sits in the lunar cycle, a steady estimate for calendars and lessons. 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.
The Moon age in days calculator estimates how many days have elapsed since the previous new moon for an explicit Gregorian date. Enter a date in strict YYYY-MM-DD form and receive a reproducible value between zero and one mean synodic month. The calculation anchors every result to a published reference new moon, interprets the requested date at midnight UTC, and never depends on the current clock, a network service, or a device time zone. It is designed for calendars, educational tools, content workflows, and other uses that need a consistent approximation rather than a precision astronomical ephemeris.
What Moon age means in this calculation
Moon age is the elapsed time since the most recent new moon, expressed in days within a repeating lunar cycle. A value near zero indicates the beginning of the modeled cycle, a value near seven corresponds roughly to first quarter, a value around fourteen or fifteen is near full moon, and a value approaching the cycle length is near the next new moon. This capability uses the mean synodic month of 29.530588853 days.
That average is a practical model, but the Moon's real motion varies because its orbit is not perfectly circular and because the geometry among Earth, Moon, and Sun changes continuously. The result should therefore be read as an approximate lunar age, not as the observed instant of a phase at a particular location. The response includes the normalized age, the cycle length, the original date, and the reference epoch so that a consumer can understand exactly which assumptions produced the number and reproduce it independently.
How an ISO date becomes a deterministic UTC result
The input must be an explicit Gregorian date written as YYYY-MM-DD. The algorithm validates the month, the correct number of days in that month, and Gregorian leap-year rules before doing any lunar arithmetic. It then converts the civil date to an integer day offset using bounded arithmetic and treats that boundary as 00:00 UTC.
The fixed reference is a new moon at 2000-01-06T18:14:00Z. The elapsed UTC days from that instant are reduced modulo 29.530588853; negative remainders are wrapped forward into the same zero-inclusive cycle.
Using the result responsibly
Use this result when consistency and a useful lunar-cycle estimate matter more than observatory-grade timing. If an application needs the exact time of conjunction, topocentric observations, rise and set times, apparent illumination, or corrections for orbital perturbations, it should use a professional ephemeris instead. Remember that an ISO date represents an entire civil day while this calculator samples its start at 00:00 UTC; the Moon continues moving during the following twenty-four hours.
For dates near a new-moon boundary, a later time on the same calendar date could belong to the neighboring cycle in a precision model. Store the returned reference and synodic month fields if long-lived records must preserve the model's provenance.
What you can do with it
Annotate a calendar
Add a stable approximate lunar age to dated calendar entries without relying on the viewer's time zone.
Build educational material
Show how elapsed days progress through a mean lunar cycle with a transparent reference epoch.
FAQ
Is this an exact astronomical ephemeris?
No. It is a mean-cycle approximation and does not model orbital perturbations or location-specific observations.
Which time zone is used?
Every input date is interpreted at 00:00 UTC, independent of the caller's device or server time zone.
What date format is accepted?
Use a real Gregorian calendar date in strict YYYY-MM-DD form, including leading zeroes for month and day.
Why can another astronomy source differ?
A precision source may use exact conjunction times, orbital corrections, another sampling time, or observer-specific geometry.
What does a moon age of 7 or 14 days mean?
A value near 7 is roughly first quarter, around 14 or 15 is close to full moon, and a value approaching the end of the cycle means the next new moon is near. Zero marks the start of the cycle.
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/date/moon-age-days \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"2026-07-25"}'const res = await fetch("https://api.kit.forhosting.com/date/moon-age-days", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"date": "2026-07-25"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/date/moon-age-days",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"date": "2026-07-25"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/date/moon-age-days", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"date":"2026-07-25"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"date":"2026-07-25"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/date/moon-age-days", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"date": "2026-07-25"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "date.moon_age_days",
"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 an ISO date becomes a deterministic UTC result
No local time zone is consulted, so the same payload produces the same answer in Tokyo, Berlin, Nairobi, or a server running with an unusual locale.
Using the result responsibly
API automation starts at $0.002 per request, while the declared browser path uses the same pure calculation.
Integration use cases
Create reproducible fixtures
Generate deterministic lunar-age values for tests, scheduled content, or data-enrichment pipelines.
Technical questions
What range can age_days have?
It is normalized from zero inclusive up to, but not including, 29.530588853 days.
How much does an API request cost?
API requests start at $0.002; the result uses the same deterministic analytic core each time.