Skip to content
On the road today? Live police checks, crashes and speed cameras. Free app โ†’
Mulabase
Toolkit

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)

  1. Sign in to the Microsoft 365 admin centre (admin.microsoft.com) as an admin.
  2. Go to Settings โ†’ Integrated apps โ†’ Upload custom apps.
  3. Choose "Office Add-in", then "Provide link to manifest file", and paste https://mulabase.com/excel/manifest.xml. Click Validate.
  4. Pick who gets it (everyone, or a group such as your payroll team) and click Deploy.
  5. 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)

  1. Download the manifest above.
  2. Open any workbook at office.com or excel.cloud.microsoft.
  3. Home โ†’ Add-ins โ†’ More add-ins (or Advanced) โ†’ My add-ins โ†’ Upload my add-in.
  4. Choose the file you downloaded and click Upload.
  5. It stays until you clear your browser's data; if it goes, upload it again.

Excel for Windows (Microsoft 365)

  1. Make a folder such as C:\addins and put the downloaded manifest in it.
  2. Right-click the folder โ†’ Properties โ†’ Sharing โ†’ Share โ†’ add yourself โ†’ Share. Note the network path it shows, like \\YOUR-PC\addins.
  3. 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.
  4. Close Excel completely and open it again.
  5. Home โ†’ Add-ins โ†’ Advanced (or Insert โ†’ My Add-ins) โ†’ Shared Folder โ†’ Mulabase โ†’ Add.

Excel for Mac (Microsoft 365)

  1. 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).
  2. Copy the downloaded manifest into the wef folder.
  3. 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

CountryCurrent rules fromPast months back toChecked
Botswana1 July 20261 July 20269 November 2026
Ghana1 September 20261 September 20267 October 2026
Kenya1 February 20261 December 202424 September 2026
Lesotho1 April 20261 April 20269 November 2026
Liberia1 January 20251 January 202529 November 2026
Malawi1 January 20261 January 20269 November 2026
Mauritius1 July 20261 July 202529 November 2026
Namibia1 September 20261 March 20269 November 2026
Nigeria1 January 20261 January 202613 October 2026
South Africa1 March 20261 March 202427 September 2026
Tanzania1 July 20251 July 20253 October 2026
Uganda1 July 20261 July 202529 November 2026
Zambia1 January 20261 January 20269 November 2026
Zimbabwe1 January 20251 January 20259 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.

Privacy ยท Terms ยท Support ยท Data API