Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallBuild the simulator around the Inland Revenue Department’s official APIT tables—not by dividing an annual tax estimate by 12. For the verified Year of Assessment (Y/A) 2025/2026 rules, keep monthly APIT withholding separate from an annual tax estimate and from any EPF or employer-specific deductions. The IRD materials cited here do not establish the APIT tables for Y/A 2026/2027, so a simulator published for that year must use the applicable newer table set once verified.
What the simulator should calculate—and what it should not assume
APIT is tax withheld from employment income when remuneration is paid. Under Section 83A, employers deduct income tax using tables specified by the Commissioner General of Inland Revenue. The employer remits the amount by the 15th of the following month, according to the IRD’s APIT guidance.
That makes APIT a withholding figure, not automatically the employee’s final annual tax liability or a complete take-home-pay calculation. The IRD sources establish APIT rules, but do not define every employee-side deduction needed for a full payroll result. Keep each figure visible and label the result according to what the app actually calculates.
- Gross pay: the salary amount and period entered by the user.
- APIT: withholding calculated through the applicable official table and employment-income path.
- Other deductions: EPF or other amounts only if the app has a verified rule or the user supplies an amount. Do not imply these are included when they are not.
- Estimated take-home pay: gross pay minus the deductions the app explicitly includes. Display an assumptions note beside the result.
Use a clear label such as “estimated monthly pay after APIT and listed deductions.” If only APIT is included, say so in the label rather than presenting the result as a complete payroll net figure.
#1 Best Overall
Choose the assessment year and APIT path first
Use a dated official table set
The figures in this article are for Y/A 2025/2026. The IRD’s 2025/2026 tax chart was last updated on 2025-08-28. The IRD APIT tables page provides year-specific tables, and the 2025/2026 APIT guideline says it applies for Y/A 2025/2026 and onwards. The APIT page was last updated on 2026-02-24, but the available material does not establish which tables apply to Y/A 2026/2027. Select the year explicitly in the interface and verify the relevant IRD table set before presenting a later year as supported.
Do not treat every employment payment as a regular monthly salary
The IRD publishes separate APIT paths for regular monthly employment income, lump sums, terminal benefits, non-resident non-citizen employees, cumulative gains, secondary employment and foreign-employer income. Table 01 is not a universal substitute for those cases. Start with the path your app can implement and verify; add the others only after encoding their corresponding tables and rules.
Rank #2
| Payment or employee case | Simulator treatment |
|---|---|
| Regular monthly primary employment | Use the relevant official monthly table if implemented and verified; identify the assessment year and table version in the result. |
| Secondary employment | Use its relevant APIT path. Do not silently reuse the regular primary-employment calculation. |
| Lump sum or terminal benefit | Use the relevant separate table and rules; do not treat a one-off payment as ordinary monthly salary. |
| Non-resident or foreign-employer case | Confirm the applicable status and table before calculating. The IRD tables distinguish these cases. |
Keep annual tax rates distinct from monthly APIT withholding
The Y/A 2025/2026 IRD chart lists annual rates on taxable income: the first LKR 1,000,000 at 6%, the next LKR 500,000 at 18%, the next LKR 500,000 at 24%, the next LKR 500,000 at 30%, and the balance at 36%. It also lists personal relief of LKR 1,800,000 for residents and non-resident citizens of Sri Lanka. These are chart figures, not a rule to apply the marginal rates directly to gross monthly salary.
A useful app can show an annual progressive-tax illustration as a separate feature, provided its input is taxable income calculated under the applicable rules. Do not assume gross salary equals taxable income or apply the relief to every user without checking eligibility and the relevant rules. This function implements only the listed marginal bands for a taxable-income amount; it does not calculate taxable income, determine relief eligibility, or reproduce monthly APIT withholding.
def annual_tax_on_taxable_income(taxable_income_lkr):
bands = [
(1_000_000, 0.06),
(500_000, 0.18),
(500_000, 0.24),
(500_000, 0.30),
]
remaining = max(0, taxable_income_lkr)
tax = 0
for band_size, rate in bands:
taxable_in_band = min(remaining, band_size)
tax += taxable_in_band * rate
remaining -= taxable_in_band
tax += remaining * 0.36
return tax
For example, if the user supplies LKR 2,000,000 as taxable income, this band calculation returns LKR 230,000: LKR 60,000 on the first LKR 1,000,000; LKR 90,000 on the next LKR 500,000; and LKR 80,000 on the remaining LKR 500,000 at 24%. It is an annual progressive-rate illustration, not the monthly amount an employer must withhold under an APIT table.
The IRD chart’s personal-relief figure is relevant context, but the simulator should apply relief only as the governing rules allow when determining taxable income. Keep that step explicit instead of burying it inside a function that accepts gross salary.
Build the Streamlit interface around visible assumptions
Inputs to make explicit
Use LKR in every salary and deduction label. Present the salary period, assessment year, employment path and payment type as visible inputs or fixed, clearly stated scope. If the first version supports only regular monthly primary employment, state that restriction beside the input rather than offering unsupported choices.
- Monthly gross employment income, with a clear indication of whether any entered amount is recurring or one-off.
- Assessment year and APIT table version used for the result.
- Employment-income path supported by the implementation, such as regular monthly primary employment.
- Any non-tax deductions included, with their source or a user-entered amount clearly distinguished.
Separate the calculation layers in Python
Keep the app’s responsibilities distinct: validate the user’s inputs, select the applicable APIT path and year, calculate withholding using the corresponding verified official table, calculate any separately supported annual estimate, and subtract only deductions the app actually includes. This separation makes it harder for a display change or a new payment category to silently alter the tax logic.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Best Value
For monthly APIT, encode or load the applicable IRD table and its rules; do not substitute the annual-rate function above. The available source material does not provide the row values needed to publish a complete Table 01 implementation here. A release should be considered APIT-capable only after its table values, thresholds, rounding and applicable user path have been checked against the relevant IRD publication.
Show the result as a breakdown
Display gross pay, APIT, each included non-tax deduction and the resulting estimate as separate line items. Put the table year and case scope next to the APIT amount, and make the assumptions easy to find without hiding them in a tooltip. If the app cannot calculate a deduction, label it excluded rather than silently treating it as zero.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Validate the calculations before publishing
Validation should check both arithmetic and tax-path selection. Compare the app’s APIT output with the relevant official IRD table for representative inputs, including values at and around table thresholds. Check that changing the assessment year or employment case cannot continue using a different table unnoticed.
- Test zero, ordinary and high input amounts, plus boundary values around every implemented table threshold.
- Check that changing from regular employment to a lump sum or secondary employment selects a distinct supported path, or produces a clear “not supported” message.
- Check that a missing or unverified year cannot produce a result presented as current.
- Verify that the take-home arithmetic subtracts only the deductions shown in the breakdown.
- Retain the source year and version with the calculation so an update does not leave an old table looking current.
A community forum post matching the project’s salary/APIT simulator framing was reported as published in the week before 2026-10-05, but the page was unavailable for inspection. It therefore does not establish that any particular implementation, code, tax calculation, library behavior or deployment is accurate.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

