ForHosting KIT · Finance & money

Gratuity calculator

A monthly basic salary of 10,000, 5 years of service and 21 days per year give an end-of-service gratuity of 35,000, from a daily wage of 333.33. Check a settlement letter or quote an exit package before signing. 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
Salary
10,000
Years
5
Days per year
21
You get
Daily wage
333.33
Gratuity
35,000

End-of-service gratuity is the lump-sum benefit an employer pays when employment ends, computed from the last monthly basic salary, the length of service, and the days-per-year factor that the applicable labour rule uses. People search that as a gratuity calculator, not as a restaurant tip split and not as a generic salary projection. This tool takes those three numbers, converts monthly basic pay into a daily wage with the conventional thirty-day month, multiplies by the days credited for each year of service and by the years themselves, and returns the gratuity payout together with the daily wage used.

What end-of-service gratuity is and how the payout is built

End-of-service gratuity is a statutory or contractual lump sum paid when a job ends, not a restaurant tip and not a retirement corpus that compounds monthly deposits. The wage base is the last monthly basic salary. That monthly figure is turned into a daily wage by dividing by thirty, the conventional number of days in a month for this identity.

A worked example: a monthly basic of ten thousand with five years of service and twenty-one days per year yields a daily wage of three hundred thirty-three point thirty-three after half-up rounding to two decimals and a gratuity of thirty-five thousand exactly, because ten thousand times five times twenty-one divided by thirty is thirty-five thousand. Fractional years are allowed so a tenure of seven and a half years at thirty days per year is not silently truncated. Zero years is a well-posed empty tenure and returns a zero payout.

Exit-package quotes for HR and payroll

Turn monthly basic salary, years of service, and the applicable days-per-year factor into the gratuity payout and the daily wage for settlement letters and payroll explainers.

Employee settlement checks

Verify a draft end-of-service award against the thirty-day daily-wage identity without opening a hidden spreadsheet for each tenure and factor.

What happens if years of service is negative?

A negative tenure is not accepted; enter zero or more years of service. Failed validation is not billed.

What is the days-per-year factor?

It is the number of days of daily wage credited for each year of service under the rule you are applying — commonly 21 or 30. You supply that factor; this calculator does not look up a live labour-code table.

Is salary monthly or annual, and can years be fractional?

Salary is monthly basic pay. Fractional years are allowed so a tenure such as 7.5 years is not truncated. Zero years returns a gratuity of zero.

How is end-of-service gratuity calculated?

The monthly basic salary is divided by 30 to get a daily wage, which is multiplied by the days credited per year and by the years of service. With 10,000, 5 years and 21 days, that is 35,000.

What if the rule pays 21 days for the first years and 30 days after?

Calculate each band on its own: once with the years that fall under 21 days, once with the years that fall under 30 days, using the same salary. Then add the two gratuity figures to get the total payout.

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/fin/gratuity

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/fin/gratuity \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"salary":10000,"years":5,"days_per_year":21}'
{
  "salary": 10000,
  "years": 5,
  "days_per_year": 21
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "fin.gratuity",
  "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.

When years of service is negative the task fails with invalid_input instead of inventing a reverse-time benefit.

What end-of-service gratuity is and how the payout is built

The applicable rule then credits a fixed number of those daily wages for each year of service: twenty-one days per year is a common first-band factor, thirty days per year is a common later-band factor, and other contracts publish their own days-per-year number. Multiplying daily wage by that factor and by years of service is exactly salary times years times days_per_year divided by thirty.

Input contract, response shape, and error behaviour

A negative salary or a negative days-per-year factor is rejected for the same reason a wage base and a credited-day count cannot run backwards. Pair the result with your own banding if the applicable rule switches from twenty-one days to thirty days after a fifth year: call once per band with the years that sit in that band and add the two gratuity figures. Start here when the product question is a transparent, three-input end-of-service payout for a page, a worksheet, or a batch of exit scenarios that already share one basic salary and one days-per-year factor. POST a JSON body with three required finite numbers: salary (the monthly basic pay that becomes the daily wage, zero or greater; aliases basic_salary, basic, wage, pay), years (years of service, greater than or equal to zero and at most eighty; aliases years_of_service, service, tenure, n), and days_per_year (days of daily wage credited for each year of service, zero or greater and at most three hundred sixty-five; aliases days, factor, days_factor, dpy). Each field may arrive as a JSON number or as a numeric string. Missing fields, empty strings, booleans, and non-finite values fail with invalid_input naming the field and are not billed. On success the body echoes salary, years and days_per_year; reports daily_wage rounded half-up to two decimal places as currency; returns gratuity rounded half-up to two decimal places from the full-precision product salary times years times days_per_year divided by thirty, so rounding the displayed daily wage does not silently change the payout; and includes a short formula string restating that identity.

Where an end-of-service gratuity calculator earns its keep

Human-resources teams quoting an exit package can post the same three numbers for a twenty-one-day band and a thirty-day band and read a stable gratuity with a two-decimal currency contract. Educators teaching end-of-service benefits can seed classroom examples that show ten thousand a month at twenty-one days for five years versus thirty days for the same tenure, and can demonstrate the hard fail when someone types a negative year count. Failed validation does not consume balance. Employees checking a draft settlement against the daily-wage identity can pin daily_wage next to the award instead of trusting a one-line spreadsheet that hid the thirty-day divisor. Because the implementation is tier A parse, every successful call costs the published $0.002 base price with no model tokens and no outbound network. Keep years at zero or more, keep salary and days_per_year non-negative, pin the rounded gratuity in tests, and you get reproducible end-of-service payouts for widgets, CMS embeds, and edge workers without standing up a spreadsheet service of your own.

Classroom and policy walkthroughs

Let learners submit salary, years, and days_per_year and verify the payout, including the hard fail when the year count is negative.

How is end-of-service gratuity calculated from salary, years, and days per year?

Divide monthly basic salary by thirty to obtain the daily wage, then multiply by days_per_year and by years of service. Equivalently, gratuity equals salary times years times days_per_year divided by thirty, after half-up rounding to two decimal places.

What does the gratuity calculator cost?

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

Read the full KIT documentation →