What If Analysis - Loan Amortization Calculation

This What-if Analysis looks at the effect that changing an input value has on a formula or formulas. As example is taken the impact that principal, interest rate and time term have in the payments done every month to pay a given loan.

This sample breaks down each payment done for the loan repayment, into the components of interest and principal during a specified period of time. Sample Input Variables: Loan amount - The principal or amount financed. Annual interest rate - The interest rate or rate the lender is charging for the use of the money. Loan period - The term or amount of time for repayment. In this example the term is measured in YEARS. Start date of loan - This date sets the payment date for the monthly payments. This example uses a predefined workbook that is loaded into SpreadJS. It highlights the use of financial formulas, calculators, dropdowns, sliders, and datepickers.
window.onload = function () { var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 1 }); initSpread(spread); }; function initSpread(spread) { var sd = data; if (sd.length > 0) { if (!spread) { return; } spread.suspendPaint(); spread.fromJSON(sd[0]); spread.options.tabStripRatio = 0.7; spread.options.newTabVisible = false; spread.resumePaint(); } }
<!doctype html> <html style="height:100%;font-size:14px;"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" type="text/css" href="$DEMOROOT$/en/purejs/node_modules/@mescius/spread-sheets/styles/gc.spread.sheets.excel2013white.css"> <script src="$DEMOROOT$/en/purejs/node_modules/@mescius/spread-sheets/dist/gc.spread.sheets.all.min.js" type="text/javascript"></script> <script src="$DEMOROOT$/en/purejs/node_modules/@mescius/spread-sheets-shapes/dist/gc.spread.sheets.shapes.min.js" type="text/javascript"></script> <script src="$DEMOROOT$/spread/source/js/license.js" type="text/javascript"></script> <script src="$DEMOROOT$/spread/source/data/loan-amortization.js" type="text/javascript"></script> <script src="app.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="styles.css"> </head> <body> <div class="sample-tutorial"> <div id="ss" style="width:100%;height:100%"></div> </div> </body> </html>
.sample-tutorial { position: relative; height: 100%; overflow: hidden; } body { position: absolute; top: 0; bottom: 0; left: 0; right: 0; }