EOBI No of Days Contribution Calculator 2025

EOBI No of Days Contribution Calculator

EOBI No of days Contribution Calculator





Results

Total Employer Contribution: Rs. 0

Total Employee Contribution: Rs. 0

EOBI CONTRIBUTION CALCULATOR

EOBI login with IPS without intranet

Introduction

Employers and HR departments face an ongoing need to manage contributions to employee retirement plans. In Pakistan, the Employees’ Old-Age Benefits Institution (EOBI) serves this function. Contributions must be calculated correctly and submitted for each insured employee. Traditionally, these were calculated on a monthly basis, but with evolving labor patterns and project-based employment, many organizations now calculate contributions on the basis of the number of days worked. This article walks you through building an online contribution calculator that does exactly that—based on daily work records, using WordPress.


2. Understanding the Need for EOBI No of Days Contribution Calculator

The EOBI pension system is vital for securing the financial future of workers. Employers are legally required to submit contributions for all registered employees. With the increasing use of digital tools for HR and payroll, automating contribution calculations has become not only desirable but essential. Manual calculation is time-consuming and error-prone, especially when employees work varying numbers of days.


3. Employer vs. Employee Contributions – Defined

In the EOBI system:

  • Employer Contribution: 5% of the minimum monthly wage
  • Employee Contribution: 1% of the minimum monthly wage

These values are calculated per 30-day month, so if someone works fewer days, contributions are prorated.

For example, if the minimum wage is PKR 32,000:

  • Employer’s monthly contribution = 32,000 × 5% = PKR 1,600
  • Daily Employer Contribution = 1,600 ÷ 30 ≈ PKR 53.33
  • Employee’s monthly contribution = 32,000 × 1% = PKR 320
  • Daily Employee Contribution = 320 ÷ 30 ≈ PKR 10.67

EOBI No of Days Contribution Calculator

4. The Importance of Daily-Based Contribution Calculations

Not all employees work for full months—some may join late, leave early, or work project-based days. Using the number of days worked ensures fairness and legal compliance.


5. Role of CSV in Managing Contribution Data

A CSV (Comma-Separated Values) file allows easy entry and processing of large employee datasets. A typical CSV might look like this:

CopyEditEMP_AREA_CODE,EMP_REG_SERIAL_NO,...,NO_OF_DAYS_WORKED,From_Date,To_Date
KHI,1234,...,26,01-01-2024,31-01-2024
LHR,5678,...,15,01-02-2024,15-02-2024

By uploading such a file, HR departments can streamline calculations.


6. WordPress as a Platform for Hosting the EOBI No of Days Contribution Calculator

WordPress is widely used for building dynamic websites and allows embedding of custom HTML and JavaScript. This makes it a perfect platform for deploying a browser-based calculator without heavy development or plugin use.

Benefits:

  • No coding knowledge required to set up
  • Runs client-side (no server processing needed)
  • Easy to customize or expand
  • Works on any WordPress theme

7. Building the Calculator – Step-by-Step

The core components include:

  • An input for minimum wage
  • A file upload for CSV
  • A calculation button
  • Output sections for Employer and Employee Contributions

The full HTML + JavaScript code was provided earlier in this conversation and can be pasted directly into a Custom HTML block in WordPress.


8. Parsing the CSV File

Using the FileReader API in JavaScript, the uploaded file is read line by line. The NO_OF_DAYS_WORKED field is in the 12th column (index 11), so we extract this value for each row.

Code sample:

javascriptCopyEditconst daysWorked = parseFloat(cols[11]);

This line fetches the number of days an employee worked, which is then used to calculate contributions.


9. Mathematical Logic for Calculations

We use the following logic:

javascriptCopyEditconst dailyEmployerRate = (minWage * 0.05) / 30;
const dailyEmployeeRate = (minWage * 0.01) / 30;
totalEmployer += daysWorked * dailyEmployerRate;
totalEmployee += daysWorked * dailyEmployeeRate;

This ensures calculations are proportional to days worked rather than a flat monthly rate.


10. Output Design – Total Contributions

After parsing the entire CSV and calculating per employee, we display the total contribution amounts on the screen:

htmlCopyEdit<p><strong>Total Employer Contribution:</strong> Rs. <span id="employerResult">0</span></p>
<p><strong>Total Employee Contribution:</strong> Rs. <span id="employeeResult">0</span></p>

This allows the HR team to see an aggregate view instantly.


11. Real-World Example

Example CSV:

CopyEditEMP_AREA_CODE,EMP_REG_SERIAL_NO,...,NO_OF_DAYS_WORKED
KHI,1234,...,28
ISB,5678,...,15

Input:

  • Minimum Monthly Wage: 32,000

Output:

  • Daily Employer Rate: 32,000 × 5% ÷ 30 = 53.33
  • Daily Employee Rate: 32,000 × 1% ÷ 30 = 10.67
  • Total Employer Contribution = (28 + 15) × 53.33 = 43 × 53.33 = Rs. 2,293.19
  • Total Employee Contribution = 43 × 10.67 = Rs. 458.81

12. User Experience and Interface

The interface is designed for simplicity:

  • Clean form inputs
  • No page reload
  • Instant results
  • Works on mobile and desktop

This ensures accessibility for non-technical users such as HR executives.


13. Technical Considerations

  • FileReader API is used for local file reading.
  • CSV parsing assumes commas as delimiters. For Excel-generated files using semicolons or tabs, extra logic may be needed.
  • Error Handling: If the file or wage is not valid, an alert is shown.

14. Security Considerations

  • The calculator runs on the client side, so no sensitive data is stored or transmitted.
  • Ensure the WordPress site uses HTTPS to protect data entry.
  • Don’t allow the upload of executable or suspicious files via the upload field.

15. Potential Enhancements

  • Per Employee Breakdown: Show each person’s contributions.
  • CSV Export: Allow users to download the output data.
  • PDF Export: Generate a printable report.
  • Validation: Highlight rows with missing or invalid values.
  • Dynamic Min Wage: Fetch from a live API based on year.

16. Common Mistakes to Avoid

  • Incorrect column indexing (remember JavaScript uses zero-based indexing)
  • Forgetting to skip header row in CSV
  • Using the wrong delimiter (comma vs tab)
  • Allowing non-numeric or empty rows to skew totals

Can I upload Excel (.xlsx) files?

No, only .csv files are supported in this version. Convert Excel to CSV first.

What happens if someone works 0 days?

That row is ignored or contributes 0 to total

Can I reset the form?

Refreshing the page will clear the input.

Leave a Reply

Your email address will not be published. Required fields are marked *

Facebook comments