Frontend
Salary
Ctc Salary Heads Calculation

CTC Report & Salary Head Calculations

This document provides a detailed breakdown of Cost to Company (CTC) logic, salary head calculations, their dependencies, and dynamic behaviors.


1. Salary Head Calculation Flow

Salary components are generally classified into Earnings and Deductions. The calculation flow dictates how a configured Amount in the Head Master transforms into the final paid amount.

Dynamic Calculation Behavior Matrix (Excel Logic)

Component CategoryPresence Dependent (true)Presence Dependent (false)Statutory Gross Impact
Fixed Allowance (e.g., Basic, HRA)(Amount / Month Days) * Att. DaysPays flat Amount regardless of attendanceIf pfGrossPart=true or esiGrossPart=true, added to respective pools.
Overtime (OT)N/A (Calculated hourly/daily)N/AUsually added to ESI Gross if ESIonOT=true in Unit.
ArrearsN/A (Manual entry/Auto-derived)N/ASubjected to Arrear PF and Arrear ESI based on configurations.

Step-by-Step Salary Head Processing

  1. Base Extraction: The system fetches the configured Amount for a head from the Employee Head Master or Salary Head Master.
  2. Proration Check: If presenceDependent is true, the amount is prorated: Amount * (attendanceDays / monthDays).
  3. Gross Aggregation: The prorated amount is added to GrossPay.
  4. OT Evaluation: If otGross is true, the amount contributes to the RateGross used to determine the hourly/daily OT rate.
  5. Deduction Processing: Standard deductions (Loans, Advances) are subtracted from GrossPay. Statutory deductions (PF, ESI, PT) are calculated dynamically based on the aggregated pools (PF Gross, ESI Gross).
  6. Net Pay Generation: Net Pay = Gross Pay + OT + Arrears - Total Deductions.

2. CTC (Cost to Company) Logic

The CTC represents the total cost incurred by the employer for the employee, encompassing direct compensation (Net Pay), taxes, and employer-side statutory contributions.

CTC Formula Components

The standard formula for calculating the Monthly CTC is:

CTC = Total Gross Earnings + Employer PF Contribution + Employer ESI Contribution + Employer LWF + Other Employer Benefits

Detailed Component Breakdown

1. Total Gross Earnings (totalEarnings)

  • Sum of all earning heads (Basic, HRA, DA, Special Allowances).
  • Formula: Σ (All Earning Heads)

2. Employer PF Contributions

The employer's 12% PF contribution is split across multiple accounts based on the pensionWages and pfGrossActual.

  • EPS (Pension - AC10): Pension Wages * 8.33% (Subject to max wage ceiling of ₹15,000, max contribution = ₹1,250).
  • EPF (Employer Share - AC1): Total Employer PF (12%) - EPS (AC10).
  • EDLI (AC21): Pension Wages * 0.5% (Max ₹75).
  • Admin Charges (AC2): PF Gross Actual * 0.5%.
  • Total Employer PF Impact: AC1 + AC10 + AC2 + AC21.

3. Employer ESI Contributions

  • Formula: ESI Gross Actual * 3.25% (Stored as esiEmr).
  • Condition: Only calculated if ESI is applicable for the employee.

4. Employer LWF & Professional Tax

  • LWF (Employer Share): State-specific slab calculation (Stored as lwfEmr).
  • Note: Professional Tax is an employee deduction and does not add to the employer's CTC, but it reduces the employee's Net Pay.

5. Additional Benefits

  • GPA (Group Personal Accident) / GTLI: Fixed monthly premium amounts configured at the Unit or Designation level.
  • Trust Contributions: Custom employer trust funds (if applicable).

Final CTC Assembly Example

ComponentCalculation LogicExample Amount (₹)
BasicProrated Earning15,000.00
HRAProrated Earning7,500.00
Total GrossBasic + HRA22,500.00
Employer PF (AC1+AC10)12% of 15,000 (Basic)1,800.00
PF Admin Charges0.5% of 15,00075.00
EDLI (AC21)0.5% of 15,00075.00
Employer ESI (3.25%)3.25% of 22,500731.00
Employer LWFFlat rate as per State10.00
Total CTCGross + Employer Contrib.25,191.00

3. Dynamic Calculation Scenarios

Scenario A: Employee Crosses ESI Limit Mid-Year

  • Behavior: If an employee's Gross Pay exceeds ₹21,000, ESI deductions technically stop. However, the ESI cycle runs from Apr-Sep and Oct-Mar.
  • System Logic: The esiBasedOn rule (Asper Rule) checks cumulative grosses. If the employee was eligible at the start of the contribution period, the system may dynamically continue deductions on a capped gross until the cycle resets, adhering to statutory ESI guidelines.

Scenario B: Formula-Driven Allowances

  • Behavior: Some heads are not fixed amounts but derive from others (e.g., HRA = 50% of Basic).
  • System Logic: The payroll engine uses the evaluateFormula utility. It first calculates independent components (like Basic). When calculating HRA, it replaces the formula variables dynamically: safeEvaluate("Basic * 0.5").

Scenario C: Overtime Impact on Statutory Gross

  • Behavior: An employee does 10 hours of OT.
  • System Logic:
    • If Unit ESIonOT is false, the OT amount simply adds to Net Pay.
    • If ESIonOT is true, the OT amount is added to esiGrossActual. This dynamically increases the employee's ESI deduction (0.75% of OT) and the employer's ESI contribution (3.25% of OT), directly affecting the final Net Pay and the monthly CTC.