How to Calculate Your Customer’s Age

Have you ever wondered How to Calculate Your Customer's Age and wish them a personalized Happy 19th Birthday? Or maybe even promote a Special Sale to them a week before their Anniversary (maybe even remind them their Anniversary is coming up in the process 😂 )?

Whether you need to calculate their age to wish them a personalized Happy 19th Birthday or promote a special sale and tell them that their 24th Anniversary is coming up in a week, you can calculate the years/months/weeks/days between an exact date (today, a hard set date, etc…) using the Date Calc Helper in MyFusion Helper.

So for this example I'm gonna show how to get John Doe's birthday in years, but you can modify this process to your needs.


So first thing is you'll need to create a Date Calc Helper and calculate the number of days between John Doe's Birthday and Today (remember you can use any field and date you want here): 2016-06-30_1634

NOTE: The Date Calc Helper calculates the number of DAYS between any two fields; but don't worry we'll get to the part that we can customize days into weeks/months/years after we cover the basics first.

Then, after you have created your Date Calc Helper, you'll need to create a Math It Helper with a Math Formula:2016-06-30_1651

The formula I'm using in this example is for calculating John Doe's Birthday in Years (divide_365) and also note that I'm saving it back to the same field AND I'm saving it to a Whole Number Field. The reason we use a whole number field is that we don't want the age to come back as “19.37963”. By storing the value in a whole number field it will automatically convert the value to “19” which is perfect for our needs.

Infusionsoft's definition: Whole Number – Stores whole numbers only. It will not accept letters, symbols, or decimal points.


You can now chain everything together using our Chain It Helper, to reduce the clutter in your Infusionsoft Campaigns and also eliminate the need for multiple HTTP post commands. If you want to keep it all inside of Infusionsoft you can just drag an HTTP Post snippet, then a 1 min Timer, and then another HTTP Post snippet into the sequence, one after of the other.

When Using Multiple HTTP Posts...

It's a Best Practice to separate multiple HTTP Post snippets with a 1-minute timer in between them. While this should not be technically required, it is our recommendation. Since HTTP Posts are not run on the Infusionsoft server and are external commands, sometimes there is a slight delay in their execution and allowing for that with a short timer is a smart approach.


  1. Add the Date Calc Helper 1st,
  2. Math It Helper 2nd,
  3. And don't forget to check the short delay, so the first helper has time to calculate.

If you're not using the Chain It Helper, just:

  1. Add the Date Calc Helper HTTP Post 1st,
  2. Add a 1-minute timer 2nd,
  3. And the Math It Helper HTTP Post 3rd:


That's a Wrap!

Okay, that's all there is to it. There are various possible use cases for this for different niches and depending upon how you sell. For some insurance companies, for example, their offers are only valid to certain age demographics. But regardless of your needs, using the combination of the two Helpers above, it's pretty straightforward.



Nick Kulavic

Nick Kulavic is the Co-Founder of MyFusion Solutions and the Lead Developer. Basically he's the wizard behind the curtain of all things MyFusion! :-)

Click Here to Leave a Comment Below 0 comments

Leave a Reply: