<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aurang Zeb Loona</title>
    <description>The latest articles on DEV Community by Aurang Zeb Loona (@loonaautomation).</description>
    <link>https://dev.to/loonaautomation</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4222771%2F219d4b1b-1929-4c02-9e24-86bdada59c8d.jpg</url>
      <title>DEV Community: Aurang Zeb Loona</title>
      <link>https://dev.to/loonaautomation</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/loonaautomation"/>
    <language>en</language>
    <item>
      <title>UAE Gratuity, Explained for Builders: The 2022 Rule Change Most Calculators Still Get Wrong</title>
      <dc:creator>Aurang Zeb Loona</dc:creator>
      <pubDate>Mon, 02 Nov 2026 16:41:05 +0000</pubDate>
      <link>https://dev.to/loonaautomation/uae-gratuity-explained-for-builders-the-2022-rule-change-most-calculators-still-get-wrong-4ak4</link>
      <guid>https://dev.to/loonaautomation/uae-gratuity-explained-for-builders-the-2022-rule-change-most-calculators-still-get-wrong-4ak4</guid>
      <description>&lt;p&gt;I build free, privacy-first web tools as Loona Automation. The newest one is a set of salary and tax calculators, and the first calculator I built — UAE end-of-service gratuity — taught me something surprising: a large share of the gratuity calculators on the web still apply a law that was abolished in 2022.&lt;/p&gt;

&lt;h2&gt;
  
  
  The current law (Federal Decree-Law 33/2021, Article 51)
&lt;/h2&gt;

&lt;p&gt;For a full-time foreign private-sector employee with at least 1 year of continuous service:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Daily basic wage = last monthly basic salary ÷ 30. Basic only — housing, transport and allowances do NOT count.&lt;/li&gt;
&lt;li&gt;First 5 years: 21 days of basic wage per year.&lt;/li&gt;
&lt;li&gt;Every year after the 5th: 30 days of basic wage per year.&lt;/li&gt;
&lt;li&gt;Part-years are pro-rated.&lt;/li&gt;
&lt;li&gt;Total gratuity is capped at 2 years' wage.&lt;/li&gt;
&lt;li&gt;The employer must pay within 14 days of the contract ending (Article 53).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Formula: Gratuity = (Basic/30 × 21 × min(years,5)) + (Basic/30 × 30 × max(years−5,0)), capped at 24 × monthly basic.&lt;/p&gt;

&lt;p&gt;Worked example: basic salary AED 10,000, 7 years of service → (10,000/30 × 21 × 5) + (10,000/30 × 30 × 2) = 35,000 + 20,000 = AED 55,000.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed in February 2022
&lt;/h2&gt;

&lt;p&gt;Before Decree-Law 33/2021 took effect on 2 February 2022, the UAE had limited and unlimited contracts, and resigning under an unlimited contract cut your gratuity (to 1/3 or 2/3 depending on service). That system is gone. Today all private-sector contracts are fixed-term, and resignation does NOT reduce gratuity. If a calculator asks you to pick "limited vs unlimited" or docks your gratuity for resigning, it is calculating with the old law. (Two honest exceptions: DIFC and ADGM have their own employment schemes, and some employers use the voluntary alternative savings scheme instead of gratuity.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I built it client-side
&lt;/h2&gt;

&lt;p&gt;Salary data is sensitive. The calculator runs 100% in the browser — no server, no sign-up, nothing leaves the device. The whole thing is a static site: one HTML file per tool with the formula in plain JavaScript, tested against hand-computed cases from the law text (my test suite checks the example above and the 2-year cap, among others).&lt;/p&gt;

&lt;p&gt;Try it: &lt;a href="https://loonaautomation.github.io/loona-salary-calculators/uae-gratuity-calculator/" rel="noopener noreferrer"&gt;https://loonaautomation.github.io/loona-salary-calculators/uae-gratuity-calculator/&lt;/a&gt;&lt;br&gt;
Code and the other calculators (Saudi end-of-service, Netherlands net salary with the 30% ruling, Germany gross-to-net, Pakistan salary tax): &lt;a href="https://github.com/loonaautomation/loona-salary-calculators" rel="noopener noreferrer"&gt;https://github.com/loonaautomation/loona-salary-calculators&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you spot a formula edge case I have missed — especially around unpaid-leave exclusions — I would genuinely like to hear it. Accuracy is the whole point of the tool.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>tutorial</category>
      <category>career</category>
    </item>
  </channel>
</rss>
