Financial Calculators

This page demonstrates some of the practical uses of JavaScript, by implementing some financial calculation applications which run direct inside the user's browser.

Option Price Calculator

This script calculates the price of a European option (i.e. cannot be exercised early) with no dividends. Hit the Show Price button to calculate the price.

Enter the strike price:
Enter the current price of the stock:
Enter the standard deviation of the stock price:
(in percentage terms, as a decimal)
Enter the risk-free interest rate:
(per time period, as a decimal)
Enter the time to expiration:
(number of time periods)
Enter the type of option:
Number of decimal places in answer:

Loan Repayment Calculator

This script calculates the monthly repayment terms for a loan, given the principal amount, the APR, and the repayment period of the loan. Enter the three required details in the top part of the form, and then hit the Calculate Repayment Terms button to show the monthly and total amounts you would have to repay.

Enter the principal loan amount:
Enter the annual percentage rate (APR): %
Enter the length of the loan: months
The monthly repayment amount is:
The total repayment amount is: