'; require( $root. '/wp-load.php' ); include($root."/wp-content/themes/default/header.php"); ?> = 60) || ($sale_price <= 0) || ($sale_price >= 20000000) || ($mortgage_interest_percent <= 0) || ($mortgage_interest_percent >= 50)) { throw new Exception ( 'ATTENZIONE ! - Ricontrolla i dati inseriti quindi clicca su calcola'); } if (($year_term1 <= 0) || ($year_term1 >= 60) || ($sale_price1 <= 0) || ($sale_price1 >= 20000000) || ($mortgage_interest_percent1 <= 0) || ($mortgage_interest_percent1 >= 50)) { throw new Exception ( 'ATTENZIONE ! - Ricontrolla i dati inseriti quindi clicca su calcola'); } if ($assessed_value <= 0 && $sale_price > 0) { $assessed_value = $sale_price * .85; } // calculations if ($prata==1) {$month_term = $year_term * 12; $pratax=12;} if ($prata==2) {$month_term = $year_term * 4; $pratax=4;} if ($prata==3) {$month_term = $year_term * 2; $pratax=2;} $down_payment = $sale_price * ($down_percent / 100); $annual_interest_rate = $mortgage_interest_percent / 100; if ($prata==1) {$monthly_interest_rate = $annual_interest_rate / 12;} if ($prata==2) {$monthly_interest_rate = $annual_interest_rate / 4;} if ($prata==3) {$monthly_interest_rate = $annual_interest_rate / 2;} $financing_price = $sale_price - $down_payment; $monthly_payment = $financing_price / _get_interest_factor($year_term, $monthly_interest_rate, $pratax); //echo $monthly_interest_rate; $property_yearly_tax = ($assessed_value / 1000) * $property_tax_rate; $property_monthly_tax = $property_yearly_tax / 12; $total_monthly_bill = $monthly_payment + $pmi_per_month + $property_monthly_tax + $condo_fee; if ($prata1==1) {$month_term1 = $year_term1 * 12; $pratax1=12;} if ($prata1==2) {$month_term1 = $year_term1 * 4; $pratax1=4;} if ($prata1==3) {$month_term1 = $year_term1 * 2; $pratax1=2;} $down_payment1 = $sale_price1 * ($down_percent1 / 100); $annual_interest_rate1 = $mortgage_interest_percent1 / 100; if ($prata1==1) {$monthly_interest_rate1 = $annual_interest_rate1 / 12;} if ($prata1==2) {$monthly_interest_rate1 = $annual_interest_rate1 / 4;} if ($prata1==3) {$monthly_interest_rate1 = $annual_interest_rate1 / 2;} $financing_price1 = $sale_price1 - $down_payment1; $monthly_payment1 = $financing_price1 / _get_interest_factor($year_term1, $monthly_interest_rate1, $pratax1); $property_yearly_tax1 = ($assessed_value1 / 1000) * $property_tax_rate1; $property_monthly_tax1 = $property_yearly_tax1 / 12; $total_monthly_bill1 = $monthly_payment1 + $pmi_per_month1 + $property_monthly_tax1 + $condo_fee1; } catch (IncompleteException $e) { $form_complete = false; } catch (Exception $e) { $form_complete = false; echo '
' . $e->getMessage() . '
'; } ?>

Strumento per confrontare un mutuo a tasso fisso con uno a tasso variabile

Questo programma permette di effettuare un confronto tra un mutuo a fisso e uno a tasso variabile (ipotizzando per quest'ultimo un incremento o un decremento progressivo del tasso di interesse nel corso degli anni)

Mutuo a Tasso Fisso
Importo /> €
Tasso /> %
Durata /> anni
Periodicità rate

 

Mutuo a Tasso Variabile
Importo /> €
Durata /> anni
Periodicità rate
Tipo />
/>
Tasso di partenza /> %
Il tasso rimane fisso per /> anni
Simula tasso variabile
La variazione di tasso avviene
Mostra il piano di ammortamento />

 

'; $legend .= 'Mese'; $legend .= 'Quota Interessi'; $legend .= 'Quota Capitale'; $legend .= 'Capitale Residuo'; $legend .= ''; ?>

 

'; $amortable .= $legend; $remyear=$year_term; $topup=$financing_price; // Get the current month's payments for each month of the loan $addint=0; $previsione=$variabile/100; $periodovariabie=($year_term-$annifisso); $addpre= round(($previsione/($periodovariabie)),6); //echo $addpre."=".$previsione."/".($periodovariabie)."
"; //$addpre= round(($previsione/($periodovariabie)),4); while ($current_month <= $month_term) { //echo $addpre; if ($prata==1) {$monthly_interest_rate = ($annual_interest_rate+$addint) / 12;} if ($prata==2) {$monthly_interest_rate = ($annual_interest_rate+$addint) / 4;} if ($prata==3) {$monthly_interest_rate = ($annual_interest_rate+$addint) / 2;} $monthly_payment = $topup / _get_interest_factor($remyear, $monthly_interest_rate, $pratax); $interest_paid = $principal * $monthly_interest_rate; //echo $interest_paid." = ".$principal." * ".$monthly_interest_rate."
"; $principal_paid = $monthly_payment - $interest_paid; //echo $principal_paid." = ".$monthly_payment." - ".$interest_paid."
"; $remaining_balance = $principal - $principal_paid; $this_year_interest_paid = $this_year_interest_paid + $interest_paid; $this_year_principal_paid = $this_year_principal_paid + $principal_paid; if ($prata==1) {$ratalegend = 12;} if ($prata==2) {$ratalegend = 4;} if ($prata==3) {$ratalegend = 2;} $show_legend = ($current_month % $ratalegend) ? false : true; $total_spent_over_term = $total_spent_over_term + ($interest_paid + $principal_paid); $total_interest = $total_interest + $interest_paid; //echo $monthly_payment." = ".$topup." / _get_interest_factor(".$remyear.", ".$monthly_interest_rate.", ".$pratax.")"; $amortable .=' '.$current_month.' '. _money($interest_paid).' '. _money($principal_paid).' '. _money($remaining_balance).' '; if ($show_legend) { $amortable .='

Riepilogo anno '.$current_year.' :
Tasso di interesse: '.round((($annual_interest_rate+$addint)*100),1).'%
Variazione:'.($addint*100).'
Rata mensile: '. _money($monthly_payment).'
Hai speso '._money($this_year_interest_paid + $this_year_principal_paid).' dei quali
'. _money($this_year_principal_paid).' sono stati spesi per il rimborso del capitale e
'. _money($this_year_interest_paid).' per il rimborso degli interessi
Ti rimane da pagare un capitale di '. _money($remaining_balance).'

'; $current_year++; $remyear=$year_term-$current_year+1; if ($current_year <= $annifisso){ $addint=$addint+0;} else { $addint=$addint+$addpre;} $topup=$remaining_balance; $this_year_interest_paid = 0; $this_year_principal_paid = 0; if (($current_month + 6) < $month_term) { $amortable .= $legend; } } $principal = $remaining_balance; $current_month++; } $amortable .= ""; } //seconda ipotesi if (($form_complete)&&($variazione==2)){ // Set some base variables $principal = $financing_price; $current_month = 1; $current_year = 1; $this_year_interest_paid = 0; $this_year_principal_paid = 0; $total_spent_over_term = 0; // Re-figures out the monthly payment. $power = -($month_term); $denom = pow((1 + $monthly_interest_rate), $power); $monthly_payment = $principal * ($monthly_interest_rate / (1 - $denom)); // This LEGEND will get reprinted every 12 months $legend = ''; $legend .= 'Mese'; $legend .= 'Quota Interessi'; $legend .= 'Quota Capitale'; $legend .= 'Capitale Residuo'; $legend .= ''; ?>

 

'; $amortable .= $legend; $remyear=$year_term; $topup=$financing_price; // Get the current month's payments for each month of the loan $addint=0; $previsione=$variabile/100; $periodovariabile= ceil (($year_term-$annifisso)/2); //echo $periodovariabile; $addpre= round(($previsione/($periodovariabile-1)),6); //echo $periodovariabile; //$addpre= round(($previsione/($periodovariabile-1)),4); //echo $addpre."=".$previsione."/".($periodovariabie-1)."
"; while ($current_month <= $month_term) { //echo $addpre; if ($prata==1) {$monthly_interest_rate = ($annual_interest_rate+$addint) / 12;} if ($prata==2) {$monthly_interest_rate = ($annual_interest_rate+$addint) / 4;} if ($prata==3) {$monthly_interest_rate = ($annual_interest_rate+$addint) / 2;} $monthly_payment = $topup / _get_interest_factor($remyear, $monthly_interest_rate, $pratax); $interest_paid = $principal * $monthly_interest_rate; //echo $interest_paid." = ".$principal." * ".$monthly_interest_rate."
"; $principal_paid = $monthly_payment - $interest_paid; //echo $principal_paid." = ".$monthly_payment." - ".$interest_paid."
"; $remaining_balance = $principal - $principal_paid; $this_year_interest_paid = $this_year_interest_paid + $interest_paid; $this_year_principal_paid = $this_year_principal_paid + $principal_paid; if ($prata==1) {$ratalegend = 12;} if ($prata==2) {$ratalegend = 4;} if ($prata==3) {$ratalegend = 2;} $show_legend = ($current_month % $ratalegend) ? false : true; $total_spent_over_term = $total_spent_over_term + ($interest_paid + $principal_paid); $total_interest = $total_interest + $interest_paid; //echo $monthly_payment." = ".$topup." / _get_interest_factor(".$remyear.", ".$monthly_interest_rate.", ".$pratax.")"; $amortable .=' '.$current_month.' '. _money($interest_paid).' '. _money($principal_paid).' '. _money($remaining_balance).' '; if ($show_legend) { $amortable .='

Riepilogo anno '.$current_year.' :
Tasso di interesse: '.round((($annual_interest_rate+$addint)*100),1).'%
Variazione:'.($addint*100).'
Rata mensile: '. _money($monthly_payment).'
Hai speso '._money($this_year_interest_paid + $this_year_principal_paid).' dei quali
'. _money($this_year_principal_paid).' sono stati spesi per il rimborso del capitale e
'. _money($this_year_interest_paid).' per il rimborso degli interessi
Ti rimane da pagare un capitale di '. _money($remaining_balance).'

'; $current_year++; $remyear=$year_term-$current_year+1; if (($current_year > $annifisso) && $current_year < ($annifisso + $periodovariabile)){ $addint=$addint+$addpre; } else { $addint=$addint+0;} $topup=$remaining_balance; $this_year_interest_paid = 0; $this_year_principal_paid = 0; if (($current_month + 6) < $month_term) { $amortable .= $legend; } } $principal = $remaining_balance; $current_month++; } $amortable .= ""; } if (($form_complete)&&($variazione==3)){ // Set some base variables $principal = $financing_price; $current_month = 1; $current_year = 1; $this_year_interest_paid = 0; $this_year_principal_paid = 0; $total_spent_over_term = 0; // Re-figures out the monthly payment. $power = -($month_term); $denom = pow((1 + $monthly_interest_rate), $power); $monthly_payment = $principal * ($monthly_interest_rate / (1 - $denom)); // This LEGEND will get reprinted every 12 months $legend = ''; $legend .= 'Mese'; $legend .= 'Quota Interessi'; $legend .= 'Quota Capitale'; $legend .= 'Capitale Residuo'; $legend .= ''; ?>

 

'; $amortable .= $legend; $remyear=$year_term; $topup=$financing_price; // Get the current month's payments for each month of the loan $addint=0; $previsione=$variabile/100; $periodovariabile= ceil (($year_term-$annifisso)/2); $addpre= round(($previsione/($periodovariabile)),6); //echo $addpre."=".$previsione."/".($periodovariabie-1)."
"; while ($current_month <= $month_term) { //echo $addpre; if ($prata==1) {$monthly_interest_rate = ($annual_interest_rate+$addint) / 12;} if ($prata==2) {$monthly_interest_rate = ($annual_interest_rate+$addint) / 4;} if ($prata==3) {$monthly_interest_rate = ($annual_interest_rate+$addint) / 2;} $monthly_payment = $topup / _get_interest_factor($remyear, $monthly_interest_rate, $pratax); $interest_paid = $principal * $monthly_interest_rate; //echo $interest_paid." = ".$principal." * ".$monthly_interest_rate."
"; $principal_paid = $monthly_payment - $interest_paid; //echo $principal_paid." = ".$monthly_payment." - ".$interest_paid."
"; $remaining_balance = $principal - $principal_paid; $this_year_interest_paid = $this_year_interest_paid + $interest_paid; $this_year_principal_paid = $this_year_principal_paid + $principal_paid; if ($prata==1) {$ratalegend = 12;} if ($prata==2) {$ratalegend = 4;} if ($prata==3) {$ratalegend = 2;} $show_legend = ($current_month % $ratalegend) ? false : true; $total_spent_over_term = $total_spent_over_term + ($interest_paid + $principal_paid); $total_interest = $total_interest + $interest_paid; //echo $monthly_payment." = ".$topup." / _get_interest_factor(".$remyear.", ".$monthly_interest_rate.", ".$pratax.")"; $amortable .=' '.$current_month.' '. _money($interest_paid).' '. _money($principal_paid).' '. _money($remaining_balance).' '; if ($show_legend) { $amortable .='

Riepilogo anno '.$current_year.' :
Tasso di interesse: '.round((($annual_interest_rate+$addint)*100),1).'%
Variazione:'.($addint*100).'
Rata mensile: '. _money($monthly_payment).'
Hai speso '._money($this_year_interest_paid + $this_year_principal_paid).' dei quali
'. _money($this_year_principal_paid).' sono stati spesi per il rimborso del capitale e
'. _money($this_year_interest_paid).' per il rimborso degli interessi
Ti rimane da pagare un capitale di '. _money($remaining_balance).'

'; $current_year++; $remyear=$year_term-$current_year+1; if ($current_year < $periodovariabile+$annifisso){ $addint=$addint+0;} else { $addint=$addint+$addpre;} $topup=$remaining_balance; $this_year_interest_paid = 0; $this_year_principal_paid = 0; if (($current_month) < $month_term) { $amortable .= $legend; } } $principal = $remaining_balance; $current_month++; } $amortable .= ""; } if ($total_monthly_bill > 0) { ?>
Rata Mutuo Fisso
Rata Mutuo Variabile da $monthly_payment) {$segno="";} echo _money($total_monthly_bill)." a "._money($monthly_payment)." (".$segno.""._percent((($monthly_payment/$total_monthly_bill)-1)*100)."%)"; ?>
Totale Interessi Fisso
Totale Interessi Variabile (%)