.sl-ot-calculator-container {
max-width: 600px;
margin: 20px auto;
padding: 25px;
background-color: #f9f9f9;
border: 1px solid #e0e0e0;
border-radius: 8px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.sl-ot-calculator-container h2 {
text-align: center;
color: #2c3e50;
margin-bottom: 20px;
}
.sl-form-group {
margin-bottom: 15px;
}
.sl-form-group label {
display: block;
margin-bottom: 5px;
font-weight: 600;
color: #555;
}
.sl-form-group input, .sl-form-group select {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
.sl-form-group .currency-input {
position: relative;
}
.sl-form-group .currency-input input {
padding-left: 45px;
}
.sl-form-group .currency-symbol {
position: absolute;
left: 10px;
top: 10px;
color: #777;
font-weight: bold;
}
.sl-calculate-btn {
width: 100%;
padding: 12px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
font-size: 18px;
cursor: pointer;
transition: background-color 0.3s;
margin-top: 10px;
}
.sl-calculate-btn:hover {
background-color: #0056b3;
}
.sl-result-box {
margin-top: 25px;
padding: 20px;
background-color: #ffffff;
border: 1px solid #dcdcdc;
border-radius: 4px;
display: none;
}
.sl-result-row {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
.sl-result-row:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}
.sl-result-label {
color: #666;
}
.sl-result-value {
font-weight: bold;
color: #333;
}
.sl-total-ot {
font-size: 1.2em;
color: #28a745;
}
.seo-content {
max-width: 800px;
margin: 40px auto;
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
}
.seo-content h2 {
color: #0056b3;
margin-top: 30px;
}
.seo-content h3 {
color: #444;
}
.seo-content ul {
margin-bottom: 20px;
}
.highlight-box {
background-color: #e9ecef;
padding: 15px;
border-left: 4px solid #007bff;
margin: 20px 0;
}
function calculateSriLankaOT() {
// 1. Get input values using exact IDs
var basicSalaryInput = document.getElementById('basicSalary');
var otHoursInput = document.getElementById('otHours');
var divisorInput = document.getElementById('divisor');
var multiplierInput = document.getElementById('otRateMultiplier');
var resultBox = document.getElementById('resultBox');
// 2. Parse values
var basicSalary = parseFloat(basicSalaryInput.value);
var otHours = parseFloat(otHoursInput.value);
var divisor = parseFloat(divisorInput.value);
var multiplier = parseFloat(multiplierInput.value);
// 3. Validate inputs
if (isNaN(basicSalary) || basicSalary < 0) {
alert("Please enter a valid Basic Salary.");
return;
}
if (isNaN(otHours) || otHours < 0) {
alert("Please enter valid OT Hours.");
return;
}
// 4. Calculate Logic based on Sri Lankan Standards
// Standard Formula: (Basic Salary / Divisor) * Multiplier * Hours
var hourlyRate = basicSalary / divisor;
var otRatePerHour = hourlyRate * multiplier;
var totalOtPay = otRatePerHour * otHours;
// 5. Update UI
document.getElementById('displayHourlyRate').innerHTML = 'LKR ' + hourlyRate.toFixed(2);
document.getElementById('displayOtRatePerHour').innerHTML = 'LKR ' + otRatePerHour.toFixed(2);
document.getElementById('displayTotalOt').innerHTML = 'LKR ' + totalOtPay.toFixed(2);
// Show result box
resultBox.style.display = 'block';
}
How to Calculate OT Rate in Sri Lanka: A Complete Guide
Calculating overtime (OT) in Sri Lanka is a critical task for both HR professionals and employees ensuring they are compensated fairly. The calculation is governed primarily by the Shop and Office Employees Act No. 19 of 1954 and various Wages Boards decisions. Understanding the correct formula is essential for accurate payroll processing.
The Standard OT Formula in Sri Lanka
For most employees covered under the Shop and Office Employees Act, the calculation of overtime relies on determining the "Hourly Rate" derived from the monthly basic salary. The standard mathematical formula used across most industries in Sri Lanka is:
OT Amount = (Basic Monthly Salary ÷ 200) × 1.5 × Number of OT Hours
Breakdown of the Formula
- Basic Monthly Salary: This is the fixed salary amount excluding allowances, bonuses, or incentives.
- The Divisor (200): According to Sri Lankan labor regulations, the daily rate is often calculated as Basic/30, and the hourly rate implies an 8-hour workday. However, the standard accepted divisor for calculating the hourly rate for OT purposes is 200 (sometimes 240 depending on the specific Wages Board).
- The Multiplier (1.5): The legal minimum rate for overtime in Sri Lanka is 1.5 times the normal hourly rate (often referred to as "time and a half").
Divisor: 200 vs. 240
One of the most common points of confusion is whether to divide the salary by 200 or 240.
- 200 Divisor: This is the most widely used standard for office and shop employees. It assumes an average of 25 working days x 8 hours = 200 hours.
- 240 Divisor: This is used for specific trades under certain Wages Boards where the calculation basis differs, often related to factory work or specific industrial categories.
Always check your employment contract or the specific Wages Board applicable to your industry to confirm the correct divisor.
Double Pay and Holidays
While the standard OT rate is 1.5 times the hourly rate, work performed on statutory holidays or rest days (typically Sundays for some, Poya days for others) often attracts a higher premium. In many cases, work on a Poya day or a statutory holiday entitles the employee to Double Pay (2.0) or a substitute holiday.
Example Calculation
Let's assume an employee named Kumara works in a private firm in Colombo:
- Basic Salary: LKR 60,000
- OT Hours Worked: 10 Hours
- Formula: (60,000 / 200) * 1.5 * 10
Step 1 (Hourly Rate): 60,000 / 200 = LKR 300 per hour.
Step 2 (OT Rate): 300 * 1.5 = LKR 450 per OT hour.
Step 3 (Total): 450 * 10 = LKR 4,500.
Kumara's total overtime payment for the month is LKR 4,500.
Why Use an OT Calculator?
Manual calculations can lead to errors, especially when dealing with decimals or varying OT hours each month. Using the digital calculator above ensures compliance with the standard 1/200th formula used in Sri Lanka, helping employees verify their pay slips and employers process payroll accurately.