Gratuity Years Calculator: How It Works
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
A gratuity years calculator works out the number of years you have completed for gratuity eligibility, usually based on your joining date and the date you left or plan to leave your job. You enter your start date and end date, and the calculator returns the completed years and months that count toward your gratuity payment under the standard formula. This is the key figure because most gratuity rules require at least five continuous years of service before any gratuity is payable.
Formula
The calculator uses the difference between two dates, measured in days, then converts that to years and months. The core expression is:
Years = floor( (End Date − Start Date) / 365.25 )
Extra Months = floor( ( (End Date − Start Date) / 365.25 − Years ) × 12 )
Where:
- End Date – the last working day (date format YYYY-MM-DD), in days counted from a fixed reference.
- Start Date – the first working day, in the same day-count system.
- 365.25 – the average length of a year including leap years, so the result stays accurate across February 29.
- floor() – rounds down to the nearest whole number, because gratuity rules count only completed years, not partial ones.
The total months output simply divides the day difference by 30.44 (average month length) and rounds down. This is a rough figure used for quick comparison, not for legal calculation.
Worked Example
Using the default values from the calculator:
- Joining date: 2018-04-01
- Leaving date: 2024-03-31
Step 1 – Count the days between the two dates. From April 1, 2018 to March 31, 2024 is exactly 2,191 days (six years including one leap year, 2020).
Step 2 – Divide by 365.25: 2191 ÷ 365.25 = 5.9993…
Step 3 – Floor the result: floor(5.9993) = 5 completed years.
Step 4 – Extra months: (5.9993 − 5) × 12 = 11.99, floor gives 11 months.
So the calculator shows 5 years, 11 months as completed service. The total months output is floor(2191 ÷ 30.44) = floor(71.98) = 71 months.
Notice that even though the person worked almost six full years, the “completed years� figure is 5, not 6, because the last day falls one day short of the sixth anniversary. This is exactly how gratuity eligibility is typically assessed – partial years do not round up.
Why Completed Years Matter for Gratuity
Gratuity is a lump-sum payment made by an employer to an employee who leaves after a minimum period of service. In most jurisdictions that follow the common law model, that minimum is five continuous years. The “years� count is almost always based on completed years of service, not rounded up. That means:
- If you worked 4 years and 11 months, you get zero gratuity in most cases.
- If you worked 5 years and 1 day, you are eligible, but the amount is calculated using the full years (5) plus a pro-rata fraction for the extra months in some systems.
- If you worked 5 years exactly, you are eligible, and the calculation uses 5 years.
The calculator gives you the completed years and extra months so you can see at a glance whether you cross the five-year threshold. It does not compute the monetary amount, because that depends on your last drawn salary and the specific gratuity formula in your country or company policy.
How the Gratuity Amount Is Calculated
Once you know your completed years, the actual gratuity amount is usually a separate formula. The most widely used formula is:
Gratuity = (Last drawn basic salary + dearness allowance) × 15 × Completed years / 26
Where:
- Last drawn basic salary – your base pay at the time of leaving, excluding bonuses, commissions, or overtime.
- Dearness allowance – an inflation adjustment component in some countries, often added to basic salary for gratuity purposes.
- 15 – represents 15 days of salary for each completed year of service.
- 26 – the number of working days assumed in a month (not 30), because the law assumes you work 26 days a month.
- Completed years – the figure our calculator provides, rounded down to the nearest full year.
For example, if your last drawn basic salary plus dearness allowance is 30,000 and you have 7 completed years, the gratuity is: 30,000 × 15 × 7 / 26 = 121,153.85 (rounded to two decimals). If you have 5 completed years, it is 30,000 × 15 × 5 / 26 = 86,538.46.
Some employers use a different multiplier (e.g., 21 days per year) or a different divisor (30 instead of 26) if their policy is more generous. The calculator on this page only gives you the years – you must multiply by your own salary and the applicable formula.
Common Mistakes and Misconceptions
Several errors trip people up when counting gratuity years:
- Rounding up partial years – Many assume 5 years and 6 months counts as 6 years. It does not. The standard rule is completed years only, so it counts as 5 years.
- Including probation or training – Some probation periods count toward service, others do not, depending on the labour law or company policy. Check your contract or local law before assuming.
- Using calendar years instead of service years – If you joined on July 1, 2019 and left on June 30, 2024, you have exactly 5 years of service, not 5 calendar years (2019–2024). The date difference method is correct.
- Forgetting the day you joined or left – Most rules count the joining date as a working day and the leaving date as the last working day. If you leave on the morning of the anniversary, some interpretations count that day as not completed. Always confirm with HR.
- Assuming gratuity is automatic – In many places, you must apply for gratuity within a specified time after leaving. The years calculator only tells you if you qualify; it does not file the claim.
Another common misconception is that gratuity is paid only on retirement. In fact, it is payable on resignation, termination, layoff, or death, provided the minimum service period is met. The reason for leaving usually does not affect the years count, though some laws have exceptions for gross misconduct.
How to Use the Calculator Correctly
To get an accurate result, follow these steps:
- Find your exact joining date from your appointment letter or payslip.
- Find your exact leaving date – the last day you actually worked, not the date you resigned or the date your notice period ended if you were on leave.
- Enter both dates in YYYY-MM-DD format (e.g., 2019-02-15).
- Read the “Completed years� output. If it is 5 or more, you are likely eligible.
- Read the “Extra months� output to see how close you are to the next full year – useful if you are planning to resign soon and want to know if waiting a few more months pushes you over a threshold.
If you are still employed and planning a future resignation, you can use the calculator with a hypothetical leaving date to see when you will hit 5 years. For example, if you joined on 2021-09-01, entering a leaving date of 2026-08-31 gives you 4 years, 11 months – not enough. Entering 2026-09-01 gives you exactly 5 years. That one-day difference is the difference between zero gratuity and a full gratuity payment in many systems.
Limits of This Calculator
This calculator only computes the completed years and months between two dates. It does not:
- Calculate the monetary amount of gratuity – that requires your salary details and the specific formula in your country.
- Account for breaks in service – if you left and rejoined the same employer, some laws allow you to combine periods, others do not. This calculator treats the two dates as one continuous period.
- Consider unpaid leave, sabbaticals, or long absences – some jurisdictions exclude these from the service count.
- Apply the laws of a specific country – gratuity rules vary widely. The five-year threshold is common but not universal; some countries use different minimums (e.g., one year in some Gulf states, or no minimum in some European countries where gratuity is not a statutory right).
Always check your local labour law or your employment contract for the exact eligibility criteria. The calculator is a planning tool, not a legal opinion.
Gratuity vs. Other End-of-Service Benefits
Gratuity is often confused with other payments you receive when leaving a job:
- Provident fund / pension – A retirement savings scheme where both you and the employer contribute. It is separate from gratuity and usually paid out regardless of years of service.
- Leave encashment – Payment for unused annual leave days. This is calculated from your daily wage and leave balance, not from years of service.
- Severance pay – In some countries, severance is paid when you are laid off or fired without cause, and it may be calculated per year of service, similar to gratuity, but it is a different legal concept.
- Notice pay – Payment in lieu of the notice period you would have worked. This is based on your salary, not your service years.
If you are leaving a job, you may be entitled to several of these at once. The gratuity years calculator only addresses the gratuity component, so do not assume the result covers your entire final settlement.
Frequently Asked Questions
Is gratuity paid after 4 years and 11 months?
In most systems that require five completed years, no. You must complete the full five years. However, some countries or companies have exceptions for death or disability, where gratuity is paid even if the employee worked less than five years. Check your local law.
Does the gratuity years calculator include the joining day?
Yes, the calculator counts the difference between the two dates you enter. If you enter your joining date as the start and your last working day as the end, the day difference includes both endpoints in the sense that the number of days is the total elapsed time. Most legal interpretations count the joining day as a full day of service and the leaving day as the last day, so this matches common practice.
What if I worked 5 years but took 6 months of unpaid leave?
It depends on the law. Some jurisdictions allow unpaid leave to count toward service, others do not. The calculator cannot know about your leave history – it only sees the two dates. You may need to manually subtract any non-countable periods from the result.
Can I combine service from two different employers to reach 5 years?
Generally no. Gratuity is paid by each employer for the service you completed with that employer. If you worked 3 years at one company and 2 years at another, you are not eligible for gratuity from either, unless a specific law or contract allows aggregation (rare).
How do I calculate gratuity if I worked 5 years and 7 months?
You use 5 completed years in the gratuity formula, not 6. The extra 7 months are ignored in the standard formula, though some employers may pay a pro-rata amount for the extra months as a goodwill gesture. The calculator shows 5 years and 7 months, and you should use the 5 for the formula.
Is gratuity taxable?
Tax treatment varies by country. In some places, gratuity is tax-exempt up to a certain limit; in others, it is fully taxable. This calculator does not handle tax. Consult a tax professional or your local tax authority for the current rules.
Related
Formula used
in start | Joining date | - | 2018-04-01 | 0 in end | Leaving date | - | 2024-03-31 | 0 out years | Completed years | years | floor((end - start) / 365.25) | 1 out months | Extra months | months | floor(((end - start) / 365.25 - floor((end - start) / 365.25)) * 12) | 0 out total_months | Total completed months | months | floor((end - start) / 30.44) | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.