Answer
The basic formula is the total basic salary earned during the calendar year divided by 12. "Basic salary" generally excludes allowances and monetary benefits that are not part of the regular wage, such as the cash equivalent of unused leave, overtime, holiday, and night-shift differential pay, unless these are treated as part of the basic salary by company practice or agreement.
For employees who worked only part of the year, the 13th month pay is prorated based on the months actually worked. Unauthorized absences that reduce earned basic salary correspondingly reduce the computation, since it is based on what was actually earned.
Researching Philippine law? Intellegal brings Philippine case-law search, statute and issuance exploration, multi-dimension case comparison, document visualization, and cited deep-research reports into a single workflow — with every citation traced back to its original source, so you can verify each answer rather than take it on trust. Every authority it surfaces links back to its original provision or decision, so you can open the source and confirm the wording yourself, and save or export the questions and reports you reference most. See the full report for the statutes and cases behind this answer, or explore the related questions below.