in reply to Need help in doing multiplication

That line is causing an error because you don't have a $ in front of the variable. It should be:
$avg_additional = $avg_repeat_logins * $life_two / $life_one - 1;
Notice that you can take out all of the parentheses in your statement.