Fraction of month elapsed calculator
By 15 February 2024, 15 of the month's 29 days have passed, just over half of the month, with 14 days to go. Enter any date to get the elapsed fraction and percentage of its month, ready for proration, billing cycles and progress bars. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Date
- 2024-02-15
- Year
- 2,024
- Month
- 2
- Day
- 15
- Month name
- February
The fraction of a month that has already elapsed by a given civil date is the share of that calendar month sitting behind you, expressed both as a unit interval from just above zero on the first of the month through one on the last day, and as a percentage from just above zero through one hundred. Billing cycles, rent proration, subscription credit, payroll cutoffs, and monthly OKR bars all need that number without fighting host time zones or daylight-saving tables. This calculator accepts a single ISO calendar date in the strict form year-month-day with four digits, two digits, and two digits, checks that the day really exists on the Gregorian calendar including leap-year Februaries, looks up how many days that month contains, and returns the elapsed fraction as the day-of-month divided by the month length plus the matching percentage. The response also includes remaining days, remaining fraction, remaining percent, a leap flag, the English month name, and a short formula string so progress bars and proration sheets stay consistent. Impossible dates such as the twenty-ninth of February in a common year or the thirty-first of April fail with a clear validation error instead of a silent wrap.
How the elapsed fraction of a month is computed from an ISO date
Start with a civil calendar date written as year, month, and day in the international ISO form with hyphens and fixed widths so every client agrees on the same three integers. First confirm that the year lies in a practical Gregorian range from year one through nine thousand nine hundred ninety-nine and that the month is between one and twelve.
Next apply the leap-year rule used by civil calendars worldwide: a year is a leap year when it is divisible by four, except that century years are leap years only when they are also divisible by four hundred. That rule makes February twenty-nine legal in years such as two thousand twenty-four and two thousand, and illegal in two thousand twenty-three and nineteen hundred. Reject any day that exceeds that month length, for example the thirty-first of April or the twenty-ninth of February in a common year.
When the triple is valid, the elapsed fraction of the month through that date is defined as the day-of-month divided by the month length, and the elapsed percentage is one hundred times that fraction. The first of any month therefore maps to one over the month length, mid-month dates sit near one half with a small shift that depends on whether the month has twenty-eight, twenty-nine, thirty, or thirty-one days, and the last day of the month is exactly one and one hundred percent.
Remaining days equal the month length minus the day-of-month, remaining fraction is the complementary share of the month, and remaining percent is that complementary share times one hundred.
What you send and what you get back
Send one required string field named date containing a strict ISO calendar day such as two thousand twenty-four hyphen zero two hyphen one five. Days that match the pattern but are not real calendar dates, including non-leap February twenty-nine and month values outside one through twelve, also fail with a message that names the problem so clients can correct the input without guessing.
Classic checks include the fifteenth of February in a leap year mapping to fifteen over twenty-nine, the thirtieth of April mapping to exactly one and one hundred percent, the first of July mapping to one over thirty-one, and the twenty-eighth of February in a common year mapping to exactly one. Keep requests small, pin the rounded fraction and percent in tests, and you get reproducible month-progress numbers for billing, LMS plugins, and edge workers without standing up a calendar library of your own.
Where a fraction-of-month elapsed calculator shows up in real work
Finance and subscription teams prorate monthly charges when a customer starts or cancels mid-cycle and need a single trusted fraction that matches civil dates rather than Unix epoch seconds that ignore month lengths and leap Februaries. Payroll and rent operations convert a cutoff date into the share of the month already worked or occupied so pay stubs and ledgers stay readable for non-engineers. Product dashboards draw monthly progress bars for OKRs, usage quotas, and content calendars and must stay leap-aware without host time zones.
Software that must stay free of time-zone libraries still needs a pure calendar fraction for maintenance windows, compliance calendars, and personal productivity widgets defined by civil dates rather than by a live clock. If you later need only the raw day count of a month, the percent of a whole calendar year, whole days elapsed since January first, whole days elapsed inside a fiscal quarter, or first and last day of a month, treat those as separate search intents and landings rather than overloading this fraction-of-month-elapsed page.
What you can do with it
Subscription and invoice proration
Convert any ISO service date into the elapsed fraction of that billing month so mid-cycle credits and charges stay leap-aware without host time zones.
Payroll and rent cutoffs
Map a pay or occupancy cutoff to percent of the month elapsed, plus remaining days, for stubs and ledgers that non-engineers can read.
FAQ
How is the fraction of a month elapsed calculated?
The last day of the month is always exactly 1.0 and 100%.
Does a leap year change the February result?
Yes. Leap Februaries have 29 days, so 15 February is 15/29 in 2024 and 15/28 in 2023. 29 February is accepted only in leap years.
What happens if the date is invalid?
Wrong shape, out-of-range month, or impossible days such as 2023-02-29 are rejected and not charged.
Is this the same as days in a month or year progress?
No. Days in a month returns only the length 28–31. Year progress returns percent of the calendar year. This page returns the elapsed fraction and percent of the month that contains the date — a different search intent even though all three use calendar math.
What does the fraction of month elapsed calculator 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/date/fraction-of-month \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"2024-02-15"}'const res = await fetch("https://api.kit.forhosting.com/date/fraction-of-month", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"date": "2024-02-15"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/date/fraction-of-month",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"date": "2024-02-15"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/date/fraction-of-month", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"date":"2024-02-15"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"date":"2024-02-15"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/date/fraction-of-month", 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": "2024-02-15"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "date.fraction_of_month",
"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 elapsed fraction of a month is computed from an ISO date
With leap status known, look up the length of the month that contains the given date: thirty-one days for January, March, May, July, August, October, and December; thirty days for April, June, September, and November; twenty-eight or twenty-nine days for February.
What you send and what you get back
Missing fields, non-string values, and strings that do not match the four-two-two digit pattern fail with invalid_input and are not charged. On success the response echoes the normalized date string, the numeric year, month, and day components, the English month_name, days_in_month as twenty-eight through thirty-one, remaining_days until the last day of that month, a boolean is_leap_year flag, fraction as the elapsed share of the month on the unit interval, percent as that share times one hundred, remaining_fraction and remaining_percent as the complementary shares, and a short formula string that documents the leap rule and the fraction definition. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.
Where a fraction-of-month elapsed calculator shows 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. Pair the free browser run on this page with the priced API when you need the identical fraction inside an automated pipeline, and keep the mathematical result unchanged as you move from a one-off check to production billing.
Integration use cases
Monthly OKR and usage dashboards
Stamp monthly goal bars with a stable fraction and remaining_percent from strict YYYY-MM-DD inputs, with clear invalid_input on bad dates.