Annual leave calculator API

Annual leave days under Vietnam’s Labour Code: 12/14/16 days, +1 per 5 years, pro-rated months, and the payment for untaken leave when a contract ends.

GETPOSThttps://apibox.io.vn/v1/vn-annual-leave

Send the start_date with the employer, the work_type (normal 12 days; heavy 14 days for minors, disabled workers and heavy / toxic / dangerous work; very_heavy 16 days) and the year, or an end_date when the contract ends. The API adds 1 day for every 5 full years of service (Bộ luật Lao động 2019 Điều 114) and pro-rates the year when fewer than 12 months are worked: (annual days + seniority days) / 12 × months, where a part month counts when at least half of it is worked (Nghị định 145/2020/NĐ-CP Điều 66).

With days_taken and monthly_salary it returns the days left and the payment for untaken leave on termination: contract salary of the month before termination ÷ normal working days × days (Điều 67.3), and whether that pay is PIT-exempt (from tax year 2026, Nghị định 253/2026/NĐ-CP).

The decree sets no rounding rule for pro-rated days: the exact value and a half-up rounded value are both returned. Periods that count as work (probation when kept on, sick leave up to 2 months a year, unpaid leave up to 1 month…) are listed in Nghị định 145/2020 Điều 65; send non_counted_days to remove other absences.

Parameters

NameInTypeRequiredDefault
start_datequery|bodystringyesFirst day of work with this employer.
end_datequery|bodystringnoTermination date (for the untaken-leave payment).
yearquery|bodynumbernoYear to compute (default the end_date year or this year).
work_typequery|bodystringnonormalnormal, heavy or very_heavy.
days_takenquery|bodynumbernoLeave days already taken in the year.
carried_over_daysquery|bodynumbernoDays carried over from earlier years.
monthly_salaryquery|bodynumbernoContract salary of the month before termination.
working_days_per_monthquery|bodynumberno26Normal working days of that month.
months_workedquery|bodynumbernoOverride the months counted in the year.
non_counted_daysquery|bodynumbernoDays not counted as work for seniority (e.g. long unpaid leave).

Example

curl "https://apibox.io.vn/v1/vn-annual-leave?start_date=2020-01-01&end_date=2026-06-15&days_taken=2&monthly_salary=13000000" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "year": 2026,
  "work_type": "normal",
  "work_type_vi": "Làm công việc trong điều kiện bình thường",
  "work_type_en": "Normal working conditions",
  "start_date": "2020-01-01",
  "end_date": "2026-06-15",
  "service_years": 6.46,
  "full_years": 6,
  "base_days": 12,
  "seniority_days": 1,
  "entitlement_full_year": 13,
  "months_worked": 6,
  "partial_months": [
    {
      "month": 6,
      "counted": true,
      "days_in_service": 15
    }
  ],
  "days": 6.5,
  "days_rounded": 7,
  "days_taken": 2,
  "carried_over_days": 0,
  "days_remaining": 5,
  "untaken_leave_payment": {
    "applies": true,
    "monthly_salary": 13000000,
    "working_days_per_month": 26,
    "daily_wage": 500000,
    "days": 5,
    "amount": 2500000,
    "pit_exempt": true,
    "basis": "Contract salary of the month before termination ÷ normal working days (NĐ 145/2020 Điều 67.3)"
  },
  "legal": [
    "Bộ luật Lao động 45/2019/QH14 Điều 113, 114",
    "Nghị định 145/2020/NĐ-CP Điều 65, 66, 67"
  ],
  "reviewed": "2026-11-11"
}

Use cases

  • Compute leave balances in HR software
  • Pay untaken leave in the final settlement
  • Show new hires their pro-rated leave
  • Check seniority days for long-serving staff

FAQ

How many days for someone who joined in April?

For normal work: 12 / 12 × 9 months = 9 days in that year; from the 13th month the full 12 days apply.

Is untaken leave paid every year?

The law requires payment when the contract ends or the job is lost. While employed, carry-over or payment follows the company rules or agreement.

Is the payment taxed?

From tax year 2026, pay for untaken leave under the law is PIT-exempt (Nghị định 253/2026/NĐ-CP); before 2026 it was taxable salary.

Related APIs

Start with 1,000 free requests every month. Get free API key →