Well i was just lookin for something to tell me how to setup this equation an its really not hard. Sleep deprivation was just killin me i couldnt think clearly
$num = $y / ($t / $n);
if (strrpos($num,'.') > 0) {
$num = substr($num, 0, strrpos($num,'.'));
$num = $num + 1;
}