# Age Calculator

Date of birth
Calculate age on
Result unit
Result
CALCULATE

## Age Calculator?

This Age Calculator is a great tool to calculate your age exactly at every date you pick and you will get the result based on the unit you choose.
If you ever asked yourself these questions How many Years old am I, How many Months old am I, How many Days old am I or if you want to know your age in Weeks, Minutes or even in seconds, this age calculator provide multiple units for your age.
The units provided by this age calculator are:
- Seconds
- Minutes
- Hours
- Days
- Weeks
- Months
- Years
- Year(s)/Month(s)/Day(s)

## How To Use Age Calculator?

There is three inputs in this calculator, you can start by entering your birth date in the first input. There is two methods to do that you can either type you birth date and time in the input box following this date format "Day/Month/Year" or you can use the calendar picker by clicking on the calendar icon.
By just entering your birth date in the first input you will get your age at the current time in "days" as a unit.
Now The next step is to set the date on "Calculate age on", the default value will be the current date/time, you can change it by another date, for example if you wanna know your age in the next month you can just enter the next month date in this input.
The last step is to choose the unit you need for the result, you can choose "Seconds", "Minutes", "Hours", "days", "Weeks", "Months", "Years" or "Years/Months/Days", and the default value is "Days".

Note: If you choose "Months" as the unit the result will be exact and it dosen't depend on the months days between "birth date" and "Calculate Age on", for example from 1st January to 1st February and from 1st February to 1st March the result will be "1" in both cases even if January has 31 days and February has 28/29 days.

### How old you are? How to calculate your age?

In this section we will see how to calculate how old you are/was at a specific date. An example will be provided with the insctructions on how to calculate your age.

Lets say that you was born in 21/12/1999 and you want to calculate your age on 24/06/2022.
On the following steps we could use "DB" instead "date of birth" and "CO" instead of "calculate your age on".

The first step is to substract the year of date of birth (YDB) from the year of the CO (YCO), this is the formula:
Y = YCO - YDB
in the example we used we get Y = 2022-1999 = 23

The second step is to substract the month of date of birth (MDB) from the month of the CO (MCO), this is the formula:
M = MCO - MDB
And if M < 0 we should use the absolute value of M and we should substract 1 from Y so we get
M = |M| and Y = Y - 1
in the example we used we get M = 6 - 12 = -6
and -6 < 0 so M = 6 and Y = 23 - 1 = 22

The third step is to substract The day of date of birth (DDB) from the day of the CO (DCO), this is the formula:
D = DCO - DDB
and if D < 0 we should use the absolute value of D and we should substract 1 from M so we get
D = |D| and M = M - 1
in the example we used we get D = 24 - 21 = 3
and D > 0 so we keep D = 3 and M = 6

So if you was born at 21/12/1999 and youwant to calculate your age at 27/06/2022 Your age is 22 Years, 6 Months and 3 Days

Note: In some cases the day "D" will not be exact as there is months of 30 days and month of 31 days.