What you will find in this article
A monthly budget starts with a simple number: your age. This guide shows the five ways to calculate it in Morocco — by hand, in the Hijri calendar, legally, for school, or as a quick estimate — and when each one is the right choice.
- Accurate manual calculation: subtraction with borrowing is the correct way to compute an age, not dividing by 365.
- Leap-year effect: it matters whenever 29 February falls inside the period between the two dates.
- Hijri vs Gregorian: your Hijri age is always higher, because the Hijri year is about 11 days shorter.
- Precise time units: days, hours and seconds have fixed conversion constants, but months and years vary in length.
- Your age and your budget: every life stage calls for a different financial equation.
How to calculate your age by hand, in years, months and days
Subtraction with borrowing, step by step: a correct manual age starts by subtracting the years, then the months, then the days, in exactly that order. If the days come out negative, you "borrow" one month and add its real length — 28, 30 or 31 days. If the months are still negative after that, you borrow a whole year and add 12 months to get the correct result.
Avoid dividing the total number of days by 365 to get your age. That gives a wrong result, because months range from 28 to 31 days and a leap year has 366 days, not 365. The approximation produced by dividing days does not reflect your true calendar age.
A worked example: born in Casablanca on 15 March 2000
Take a birth date of 15 March 2000 and a reference date of 31 October 2026. Here is the age calculation, step by step:
In this example no borrowing is needed, because every number comes out positive. But if the birthday had been 20 November instead of 15 March, the months would have been negative (10 − 11 = −1), and we would have had to borrow a whole year and add 12 months to get the correct result.
- Years: 2026 − 2000 (the March birthday had already passed by October) = 26 years
- Months: 10 (October) − 3 (March) = 7 months
- Days: 31 − 15 = 16 days
- Final result: 26 years, 7 months and 16 days.
Are medical age and legal age the same number?
Chronological age starts at birth and increases on each birthday. Medical age, for babies and small children, is expressed in months and weeks — especially for growth and vaccination follow-up. Legal age is set by local law: in Morocco, Article 209 of the Family Code (Moudawana) states that full legal capacity is reached at 18 completed solar years.
So someone born on 31 October 2008 becomes a legal adult on exactly 31 October 2026.
What leap years change in an age calculation, and how to handle them
The leap-year rule in three sentences: a year is a leap year if it is divisible by 4, with one exception — century years such as 1900 and 2100 are leap years only if they are also divisible by 400. So 2024 is a leap year and 2000 is a leap year, but 2100 is not, even though it divides by 4.
The period from 1 January 2024 to 1 January 2025 is 366 days, not 365.
Special case — born on 29 February: in a normal year, when does the year complete? Some legal systems use 28 February, others 1 March. What decides it is the text of the local law, not any online calculator. One of the most common mistakes when computing the difference between two dates by hand is forgetting 29 February inside the period, which shifts the result by a full day.
- 2000 — divisible by 4: yes · divisible by 400: yes · leap year: yes · 366 days
- 2024 — divisible by 4: yes · divisible by 400: no · leap year: yes · 366 days
- 2025 — divisible by 4: no · divisible by 400: no · leap year: no · 365 days
- 2100 — divisible by 4: yes · divisible by 400: no · leap year: no · 365 days
How to calculate age in both the Gregorian and Hijri calendars
Gregorian vs Hijri — what changes in the calculation? The Hijri year is lunar and lasts about 354 days, while the Gregorian year is solar and lasts about 365 days. The gap between them is about 11 days per year, which means your Hijri age is always higher than your Gregorian age.
For a quick approximation, multiply your Gregorian age by the ratio 33 to 32 (about 1.03) to estimate your Hijri age. For an exact day-and-month conversion, you need a specialised conversion table or a dedicated digital tool.
Comparison table: common birth years and their Gregorian and Hijri ages (calculated to October 2026):
The gap accumulates at about one day every 32 to 33 years, and over this span the Hijri year gains a full year on the Gregorian one. That is why the Hijri months return to roughly the same Gregorian season every 33 Hijri years.
- Born 1990: 36 Gregorian years (October 2026) · about 37 Hijri years
- Born 2000: 26 Gregorian years · about 27 Hijri years
- Born 2010: 16 Gregorian years · about 16–17 Hijri years
Do you need your age in days, hours and seconds?
Time-conversion constants. Calculating your age in precise units is useful in specific cases: programmers who work with time databases, and some legal situations that need the exact moment.
These constants apply to days, weeks and hours only. Months and years cannot be converted with a fixed factor, because a month ranges from 28 to 31 days and a year has 365 or 366 days depending on whether it is a leap year.
Example: what does turning 10,000 days mean? 10,000 days is about 1,429 weeks (approximately), 240,000 hours and 864,000,000 seconds. Someone born on 15 March 2000 reaches 10,000 days around summer 2027 — a number worth celebrating, and worth reflecting on.
This kind of figure lets you see your age from a different angle: every day that passes deserves to be invested well, in your time or in your dirhams.
- 1 day = 24 hours = 1,440 minutes = 86,400 seconds
- 1 week = 7 days = 168 hours = 604,800 seconds
- 1 hour = 60 minutes = 3,600 seconds
How your age shapes savings goals and the monthly budget
Every life stage has a different financial equation.
In your twenties, education and setting-up costs are high. According to the general financial guidance widely shared by advisers, it is recommended to save between 10% and 15% of your income, to start building an emergency fund that covers 3 to 6 months of expenses.
In your thirties, family and housing costs appear, and the recommended share rises to between 15% and 20%. In your forties, retirement saving becomes the top priority, and you may need 20% or more to make up for any delay in the earlier years.
Remember that these percentages are general guidance, not binding legal rules.
Your age is not just a number in an age calculator; it is a map showing where each dirham of your salary should go. A 25-year-old Moroccan needs to focus on building a financial base and avoiding high-interest debt. A 45-year-old employee’s priority is strengthening savings and cutting non-essential spending, in preparation for retirement.
The difference between the two situations is large, and mixing them up costs a lot of dirhams.
SmartJib: when your age becomes the starting point of your budget
You enter your goals and your cash spending manually, and you follow your progress in full privacy. The app never asks for your bank account number; it relies only on what you choose to enter, which keeps your financial data in your hands alone. You can start free right away and try the dirham-based planning tools without any complexity.
Calculating your age: the first step — budgeting your dirhams the next
An accurate age calculation starts by subtracting dates while respecting borrowing, leap years and the real lengths of months. Dividing by 365 is a quick but wrong method. The Hijri age is always higher, because the Hijri year is about 11 days shorter. Converting to days, hours and seconds remains a useful tool in specific cases such as programming and law. The most important part begins once you know your age: use that number to plan your budget wisely.
Decision check: use the date and calendar required by the form
For a school, insurance or administrative form, first read which reference date and calendar the institution requests. Age in completed years changes on the birthday; simply subtracting birth year from the current year may overstate it by one.
For a Hijri or Gregorian result, confirm whether the form expects a specific calendar convention. Date conversions can differ across services. Use the exact birth date printed on the supporting document and verify any legally significant age calculation with the responsible institution.
SmartJib
Frequently asked questions
What should we do when someone was born on 29 February, to calculate their age?
Rely on the text of the local law to decide when the year completes. Some systems use 28 February, others 1 March — and do not forget that leaving 29 February out of the period shifts the result by a whole day.
Can I divide the total number of days by 365 to know my age quickly?
No, and we advise against it: the method gives a wrong result. Months are not fixed at 28 to 31 days and a leap year has 366 days, so dividing by 365 does not reflect the true calendar age.
How do I get an exact Hijri age, not just an approximation?
You need a specialised conversion table or a dedicated digital tool to get an exact day and month. The 1.03 multiplication gives a rough idea because the Hijri year is about 11 days shorter, but it does not replace an exact table or tool.
What is the difference between medical age and legal age, and when is each used?
Medical age is expressed in months and weeks for babies and small children, while legal age is set by local law — 18 completed solar years under Article 209 of the Moroccan Family Code. Medical age is used for growth and vaccination follow-up; legal age determines full legal capacity.
SmartJib keeps budget envelopes separate from bank, home, and wallet balances.
Also: Budget tracker MAD guide · 4 budgeting methods explained · Why SmartJib is private by design
Educational content, not financial advice. Figures are worked examples; verify rates and rules with the official source. Editorial policy.
