ForHosting KIT · Finance & money

Gantt chart bar duration calculator

A Gantt bar from Monday 8 January to Friday 19 January 2024 lasts 12 calendar days or 10 working days, with both ends counted. Both figures appear side by side, plus the weekday of each date. 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
Start
2024-01-08
End
2024-01-19
You get
Start weekday
Monday
End weekday
Friday
Calendar days inclusive
12
Working days inclusive
10

Project managers, schedulers, and product teams constantly ask how long a Gantt bar actually is once start and finish dates are fixed on the chart. Calendar math and working-day math disagree whenever a weekend sits inside the span, and spreadsheet formulas drift when leap days or month boundaries appear.

What a Gantt bar duration means

A bar on a Gantt chart is drawn from a start day through an end day, and in project practice both days belong to the task. That is why the length is the end date minus the start date plus one. Calendar mode counts every day in that span; working-day mode counts only Monday to Friday inside the same span. For a bar from 8 to 19 January 2024, that gives 12 calendar days and 10 working days, with the 2 weekend days shown as the difference. You choose which of the two becomes the bar's duration.

When to use it and common mistakes

Use it to check durations after importing a schedule from another tool, or when a contract must separate elapsed days from business days. The most common mistake is forgetting to count the first day, which makes every bar one day short. Another is assuming weekends are always left out. Public holidays, company closures and half days are not applied, so add those from your own calendar afterwards. An end date before the start date, or an impossible date such as 31 April, is rejected.

How Gantt bar duration is counted (inclusive calendar vs working days)

A Gantt task bar is drawn from a start civil day through an end civil day. In project practice that span is almost always inclusive: a bar that starts on Monday the eighth and ends on Friday the twelfth is five days long, not four. This capability follows that convention.

Working-day mode instead counts only Monday through Friday inside that same inclusive interval, so a five-day calendar bar that falls entirely on weekdays still yields five working days, while a span that covers a Saturday and Sunday will shrink by those weekend days. Weekday names for the start and end dates are included so you can sanity-check that a bar claimed to finish on Friday really lands on Friday.

Holidays, company-specific blackout days, and half-day schedules are intentionally out of scope; those policies vary by organization and are better layered by your own calendar service after this pure weekend-aware count.

Schedule import validation

Recompute inclusive bar lengths from exported start and end dates and flag rows where the vendor Gantt duration disagrees with calendar or working-day mode.

Milestone contract wording

Show both calendar and working spans for the same bar when legal language must distinguish elapsed days from business days.

Are weekends and holidays excluded?

Public holidays and company blackout days are not modelled; apply your own holiday list after this count if needed.

What if the end date is before the start date?

A Gantt bar cannot finish before it begins, so inverted ranges are rejected and not billed.

Does the count include both the start and end dates?

Yes. A Gantt bar runs from its start day through its end day, so both belong to the task. A bar from 8 to 19 January 2024 is 12 calendar days long because the first day is counted too.

How many working days are in a 12-day bar?

That depends on how many weekends it crosses. From 8 to 19 January 2024 the bar covers one Saturday and one Sunday, so it holds 10 working days and 2 weekend days, and both figures are shown together.

Why does the result show the weekday of each date?

So you can check the bar at a glance. If a task is supposed to finish on a Friday, the weekday of the end date confirms it really lands there, which catches typing slips in exported schedules.

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/biz/gantt-bar-duration

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/biz/gantt-bar-duration \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"start":"2024-01-08","end":"2024-01-19"}'
{
  "start": "2024-01-08",
  "end": "2024-01-19"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "biz.gantt_bar_duration",
  "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.

This Gantt chart bar duration calculator accepts an ISO start date, an ISO end date, and an optional working_days_only flag, then returns the inclusive calendar day count, the Monday-through-Friday working day count, weekend days inside the bar, weekdays for both endpoints, and a single duration_days value that matches the mode you chose. Bars that end before they begin are rejected with invalid_input.

How Gantt bar duration is counted (inclusive calendar vs working days)

Calendar mode sets duration_days to the inclusive number of Gregorian days between start and end, which is serial end minus serial start plus one. The response always reports both metrics: calendar_days_inclusive, working_days_inclusive, and weekend_days_inclusive equal to their difference, plus duration_days equal to the metric selected by working_days_only.

Input contract, response fields, and validation rules

Years must fall between one and nine thousand nine hundred ninety-nine. POST a JSON object with required string fields start and end in strict YYYY-MM-DD form, for example 2024-01-08 and 2024-01-19. Optional working_days_only defaults to false; send true, false, or common string forms such as yes and no. Aliases start_date, from, begin, end_date, to, finish, workdays_only, and business_days_only are accepted so importers from spreadsheets and PM exports need less field renaming. Each date is validated as a real Gregorian calendar day: impossible values such as 2023-02-29 or 2024-04-31 fail with invalid_input naming the field. On success the body echoes normalized start and end, start_weekday and end_weekday in English, calendar_days_inclusive, working_days_inclusive, weekend_days_inclusive, the boolean working_days_only, count_mode as calendar or working, duration_days as the selected length, and a short formula string documenting the inclusive JDN rule. Example: start 2024-01-08 Monday through end 2024-01-19 Friday yields twelve calendar days, ten working days, two weekend days, and duration_days twelve in calendar mode or ten when working_days_only is true. Pair the numbers with your own chart renderer if you need pixel widths; this endpoint computes day counts only and does not draw SVG or emit task names.

Where a Gantt bar duration API earns its keep

Portfolio dashboards that import Microsoft Project, Smartsheet, or Jira timeline CSV exports often need a second-source check of bar length before capacity heatmaps are painted. Contracting teams compare calendar span against working span when drafting milestone language that must exclude Saturdays and Sundays. Invalid dates and inverted ranges do not consume balance. Resource planners convert duration_days into person-days when working_days_only is true so weekend padding on the chart does not inflate headcount. Keep inputs as ISO calendar strings, pin duration_days and the inclusive breakdowns in tests, and you get reproducible bar lengths for schedule audits, SEO landing demos, and edge workers without standing up a full project-management database of your own.

Working-day resource estimates

Convert a task bar into Monday–Friday duration_days so capacity plans ignore weekends drawn on the chart.

How is Gantt bar duration calculated?

Provide start and end as YYYY-MM-DD. Duration is inclusive: calendar mode uses end−start+1 whole days; with working_days_only true, only Monday–Friday days inside that span are counted.

Is the day count inclusive of both endpoints?

Yes. A bar from Monday through Friday is five days, matching common Gantt and project-scheduling practice rather than exclusive end-date subtraction.

What does the Gantt chart bar duration 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 →