Download JavaScript, CSS and HTML Code of Yield to Maturity Calculator Widget

This widget calculates Total Yield, Yield to Maturity, Annualized Yield and Percentage Yield of investment in bonds.

Terms for getting the code

  1. The code is available for free use on your site / blog.
  2. You can change the code as you wish, without any restrictions.
  3. The code is not available for onward distribution by you.

Using the Codes

If you own a blog or site, create a 'div' at the location you want the widget to appear on your page and paste all the three codes given below (i.e. Javascript, CSS and HTML) in this 'div'. The widget will appear at the desired location on your page.

In case you do not own any blog or web site, you can use the codes for using the widget off-line. Open any 'text editor' like 'Notepad'. Create a new file and paste all the three codes given below in this file and save it with extension .html or .htm . This file will open in your web browser and you will be able to use the widget offline.

Javascript Code

CSS Code

HTML Code

Widget View

Yield to Maturiy Calculator
Par Value
Maturity Value
Coupon Rate
Coupon Payment
Months till Maturity
Total Yield
Yield to Maturity (YTM)
Annualised Yield
Percentage Yield

Embed Code

If you do not want to go through the hassle of hosting the widget on your site blog, you can put the above widget on your site / blog by just using the embed code of Yield to Maturity Calculator, which is available in 9 skin colors and 16 international languages.