How to calculate Yield To Maturity (YTM) – Calculator

By: Prof. Fazal Rehman Shamil
Last modified on May 27th, 2019

Yield To Maturity (YTM) Calculator

Annual Interest:
per/face value:
Market price:

years to maturity:
Dept to equity Ratio:

[insert_php]
if (isset($_GET[‘annualinterest’]) && isset($_GET[‘facevalue’]) && isset($_GET[‘marketprice’]) && isset($_GET[‘yearstomaturity’])) {
$annualinterest = $_GET[‘annualinterest’];
$pervalue = $_GET[‘facevalue’];
$marketprice = $_GET[‘marketprice’];
$yearstomaturity = $_GET[‘yearstomaturity’];
$a=$pervalue-$marketprice;
$b=$a/$yearstomaturity;
$c=$annualinterest+$b;
$d=$pervalue+$marketprice;
$e=$d/2;
$f=$c/$e;
$yeildtomaturity=$f*100;
echo $yeildtomaturity;

}
[/insert_php]

Prof. Fazal Rehman Shamil