Payroll formulas for Excel and Google Sheets
Type =MULABASE.TAKEHOME("Kenya", 150000) and get the answer. The add-ons bring PAYE, every deduction, gross-up and the employer's cost for 14 African countries into your own spreadsheets, free.
The formulas
In Excel they start with MULABASE.; in Google Sheets with MULABASE_ (so =MULABASE_TAKEHOME). Point any of the pay formulas at a column of salaries and you get a column of answers.
| =MULABASE.TAKEHOME("Kenya", B2) | Take-home pay after tax and every deduction |
| =MULABASE.TAX("Kenya", B2) | Income tax (PAYE), with surcharges such as Mauritius' Fair Share |
| =MULABASE.DEDUCTIONS("Kenya", B2) | All employee deductions except tax |
| =MULABASE.DEDUCTION("Kenya", B2, "nssf") | One deduction; a wrong code lists the right ones |
| =MULABASE.GROSSUP("Kenya", 100000) | Gross pay needed for a take-home (net to gross) |
| =MULABASE.EMPLOYER_COST("Kenya", B2) | Gross plus everything the employer pays on top |
| =MULABASE.EMPLOYER("Kenya", B2, "nssf") | One employer contribution, or all of them |
| =MULABASE.PAYE_TABLE("Kenya", B2) | A payslip-style breakdown that spills down |
| =MULABASE.PAYROLL_ROW("Kenya", B2:B301) | A whole payroll: every deduction and employer cost in its own column |
| =MULABASE.PAYROLL_HEADERS("Kenya") | The headings for PAYROLL_ROW |
| =MULABASE.RULES("Kenya", B1) | Which rule set was used and when it was checked |
| =MULABASE.FEE("Kenya", 2500, "send") | A mobile money fee (M-Pesa, MTN MoMo, Airtel Money and others) |
| =MULABASE.FEES("Uganda", 50000) | Every mobile money fee for an amount |
| =MULABASE.RATE("Nigeria") | Latest central bank rate, or "inflation" |
| =MULABASE.COUNTRIES() | What's covered |
The pay formulas take three optional arguments after the amount, in this order: period ("month" or "year"), date (a date cell or "2025-06" for past rules) and options for reliefs and switches, like "pension=5000; insurance=2000", "benefits=3000" or "exclude=sdl" for an employer below a levy threshold.
Install in Excel
The Excel add-in installs straight from mulabase.com, with no store and no account. You add one small file, the manifest, which tells Excel where the add-in lives. Pick the way that suits you:
Download the Excel add-in (manifest.xml)For a whole firm (Microsoft 365 admin)
- Sign in to the Microsoft 365 admin centre (admin.microsoft.com) as an admin.
- Go to Settings โ Integrated apps โ Upload custom apps.
- Choose "Office Add-in", then "Provide link to manifest file", and paste https://mulabase.com/excel/manifest.xml. Click Validate.
- Pick who gets it (everyone, or a group such as your payroll team) and click Deploy.
- It appears in everyone's Excel on the Home tab, usually within a few hours (Microsoft says up to 24).
Excel on the web (quickest for one person)
- Download the manifest above.
- Open any workbook at office.com or excel.cloud.microsoft.
- Home โ Add-ins โ More add-ins (or Advanced) โ My add-ins โ Upload my add-in.
- Choose the file you downloaded and click Upload.
- It stays until you clear your browser's data; if it goes, upload it again.
Excel for Windows (Microsoft 365)
- Make a folder such as C:\addins and put the downloaded manifest in it.
- Right-click the folder โ Properties โ Sharing โ Share โ add yourself โ Share. Note the network path it shows, like \\YOUR-PC\addins.
- In Excel: File โ Options โ Trust Center โ Trust Center Settings โ Trusted Add-in Catalogs. Paste the network path into Catalog URL, click Add catalog, tick Show in Menu, then OK.
- Close Excel completely and open it again.
- Home โ Add-ins โ Advanced (or Insert โ My Add-ins) โ Shared Folder โ Mulabase โ Add.
Excel for Mac (Microsoft 365)
- In Finder, press Cmd+Shift+G and go to ~/Library/Containers/com.microsoft.Excel/Data/Documents/ (make a folder called wef there if it isn't there).
- Copy the downloaded manifest into the wef folder.
- Restart Excel, then Insert โ My Add-ins (click the small arrow) โ under Developer Add-ins choose Mulabase.
Once it's in, a Mulabase button appears on the Home tab. Open it to check the rules loaded and insert a ready-made payroll sheet, then type =MULABASE.TAKEHOME("Kenya", 50000) in any cell. It should show 39,029.15.
Needs Excel for Microsoft 365 (Windows, Mac or web). Excel 2016 and 2019 don't support the custom functions.
Install in Google Sheets
The Google Workspace Marketplace listing is in review. In the meantime, the downloadable templates open in Google Sheets with File โ Import.
Countries and rules on file
| Country | Current rules from | Past months back to | Checked |
|---|---|---|---|
| Botswana | 1 July 2026 | 1 July 2026 | 9 November 2026 |
| Ghana | 1 September 2026 | 1 September 2026 | 7 October 2026 |
| Kenya | 1 February 2026 | 1 December 2024 | 24 September 2026 |
| Lesotho | 1 April 2026 | 1 April 2026 | 9 November 2026 |
| Liberia | 1 January 2025 | 1 January 2025 | 29 November 2026 |
| Malawi | 1 January 2026 | 1 January 2026 | 9 November 2026 |
| Mauritius | 1 July 2026 | 1 July 2025 | 29 November 2026 |
| Namibia | 1 September 2026 | 1 March 2026 | 9 November 2026 |
| Nigeria | 1 January 2026 | 1 January 2026 | 13 October 2026 |
| South Africa | 1 March 2026 | 1 March 2024 | 27 September 2026 |
| Tanzania | 1 July 2025 | 1 July 2025 | 3 October 2026 |
| Uganda | 1 July 2026 | 1 July 2025 | 29 November 2026 |
| Zambia | 1 January 2026 | 1 January 2026 | 9 November 2026 |
| Zimbabwe | 1 January 2025 | 1 January 2025 | 9 November 2026 |
Frequently asked questions
Is it free?
Yes, both add-ons are free with no sign-up and no paid tier. They use the free Mulabase Open Data API.
How do past months work?
Add a date: =MULABASE.TAKEHOME("Kenya", B2, , "2025-06") uses the rules in force in June 2025. Each country has rules on file back to a set date (listed below). Earlier dates give a clear error rather than a guess.
Is it fast enough for a big payroll?
Yes. The rules for every country load once and are kept for 6 hours, and the maths runs inside your spreadsheet. A 300-employee payroll is one download, not 300 calls.
What data does it send?
None of your spreadsheet. It downloads the public rule set from mulabase.com; salaries and names never leave your sheet. See the privacy policy.
Why isn't the Excel add-in in Microsoft's store?
It doesn't need to be. Office add-ins can be installed from the publisher's own site with a manifest file, which is what the steps above do. It's the same add-in, served from mulabase.com, and updates reach you automatically.
Is there a PAYE formula for Excel without an add-in?
Yes. Each country's payroll template page shows a plain Excel formula for that country's PAYE bands that you can paste into any sheet, and the downloadable templates use only ordinary formulas. The add-in adds what a fixed formula can't: every deduction, past months, gross-up and rules that update themselves.
Do Google Sheets and Excel give the same answers?
Yes. Both run the same engine as the calculators on mulabase.com, generated from one source and tested against official worked examples.