Code:
//Get Variables
	$attack = $_POST['Attack'];
	$defense = $_POST['Defense'];
	$level = $_POST['Level'];
	$energy = $_POST['Energy'];
	$stamina = $_POST['Stamina'];
	$health = $_POST['Health'];
	$arune = ($_POST['Attack'] + $_POST['ARune']);
	$drune = ($_POST['Defense'] + $_POST['DRune']);
	$aatt = ($_POST['Attack'] + $_POST['AAttack']);
	$adef = ($_POST['Defense'] + $_POST['ADefense']);
	$pierce = $_POST['Pierce'];
	$resist = $_POST['Resist'];
	$cenergy = $_POST['CEnergy'];
	$cstam = $_POST['CStamina'];
	$stampot = ($_POST['Staminapot'] * 10);
	$enepot = ($_POST['Energypot'] * 10);
	$xps = $_POST['XPS'];
	$xpe = $_POST['XPE'];
	$attndef = ($attack + $defense);
	if(isset($_POST['XPR']))
	{
		$xpr = $_POST['XPR']; } 
		else { $xpr = 0; }
	if($_POST['Zin'] == "Zin")
	{
		$zin = 15; } 
		else { $zin = 0; }
	if($_POST['Misa'] == "Misa")
	{
		$misa = 30; }
		else { $misa = 0; }
	if($_POST['Conquest'] == "Conquest")
	{
		$conquest = 24; }
		else { $conquest = 0; }
	
	//Calculations
	  //BSI
		$rbsi = round((($attndef) / $level), 2);
		$absi = round((($aatt + $adef) / $level), 2);
		$runebsi = round((($arune + $drune) / $level), 2);
		$bsi = round((($aatt + $arune + $adef + $drune - $attndef) / $level), 2);
	
	  //LSI
		$adjstam = ($stamina + $stampot + $zin);
		$adjenergy = ($energy + $enepot + $misa);
		$rlsi = round(((($stamina * 2) + $energy) / $level), 2);
		$lsi = round(((($adjstam * 2) + $adjenergy) / $level), 2);
		$avgppl = round(((($stamina * 2) + $energy + $attndef + $health - 122) / $level), 2);
		$ls1 = ((6.25 + (12.5 * $level)) - ($adjstam * $xps) - ($adjenergy * $xpe));
		$ls2 = (288 * ($xps + $xpe));
		$ttl = ($ls1 / $ls2);
		$ttl_days = floor($ls1 / $ls2);
		$ttl_hrs = round(((($ls1 / $ls2) - $ttl_days) * 24), 2);
		$effenergy = round((288 + ($adjenergy / $ttl)), 2);
		$effstamina = round((288 + ($adjstam / $ttl)), 2);
		$nl1 = ($xpr - (($cstam) * $xps) - (($cenergy) * $xpe));
	    $ttnl_days = floor($nl1 / $ls2);
		$ttnl_hrs = round(((($nl1 / $ls2) - $ttnl_days) * 24), 2);
		
	  //Power
		$rap = round(($attack + ($defense * 0.7)), 2);
		$runeap = round(($arune + ($drune * 0.7)), 2);
		$aap = round(($aatt + ($adef * 0.7)), 2);
		$ap = round((($aatt + $arune - $attack) + (($adef + $drune - $defense) * 0.7)), 2);
		$rdp = round(($defense + ($attack * 0.7)), 2);
		$runedp = round(($drune + ($arune * 0.7)), 2);
		$adp = round(($adef + ($aatt * 0.7)), 2);
		$dp = round((($adef + $drune - $defense) + (($aatt + $arune - $attack) * 0.7)), 2);
		$adavgp = round((($ap + $dp) / 2), 2);
		$tsi = $bsi + $lsi;