Building a simple gratuity calculator app in Knack — looking for formula ideas

Hi everyone

I’m experimenting with Knack to create a small internal HR tool that helps estimate end-of-service gratuity for UAE employees. Right now, I’m just using Knack forms and formulas, but I might connect an external source later.

I came across this UAE gratuity calculator for reference, which follows local labor laws super helpful for testing accuracy.

Has anyone here built something similar purely using Knack’s native formula fields? I’m trying to figure out how to handle calculations like partial years or variable salary months without using code.

Any creative workflow or logic tips would be amazing.

Hi Noah

Maybe search the forum for questions and answers about Commissions to get ideas to how to approach this in Knack e.g. Complex Commission Calculations

Dean

1 Like

That’s a fantastic initiative! Building a tool like this internally is a great way to empower your HR team. You’ve hit on the core challenge with no-code platforms when it comes to the specific, tiered logic of UAE gratuity law.

I went down this exact same path. While native formulas are excellent for straightforward calculations, they can struggle with the multiple conditional rules—especially the different reductions for resigning from an unlimited contract versus a limited one, and the pro-rata calculations for partial years.

Ultimately, for our public-facing online UAE gratuity calculator, we found that a small amount of custom JavaScript was necessary to handle all the legal nuances with 100% accuracy. Within Knack, you might have some success by creating separate “helper” fields that use conditional rules to calculate th