You can maybe try something like this :
$post_1 = 1526083200;
$post_2 = 1524083200;
$post_3 = 1523083200;
$post_4 = 1522083200;
// I add all the value in an array then sort the array to get the min and max value
$date_array = [$post_1, $post_2, $post_3, $post_4];
sort($date_array);
// Now I can select the min date and the max date
$min_date = $date_array[0];
$max_date = $date_array[count($date_array) - 1];
// I calculate the diff to get the number of day during this period
$datediff = $max_date - $min_date;
// I divide this value with the number or article post during this period
$frequency = $datediff / count($date_array);
// Now I transform this value in number of day
$frequency = round($frequency / (60 * 60 * 24));
With your example, this is what you got :
- Number of articles :
4
- Min date :
2018-03-26
- Max date :
2018-05-12
- Number of day of the period :
46
- Frequency :
12
That sound good for me with those value , one article every 12 days.
Is it what you are looking for?