Amortization Schedule & Payment Calculator
How do I make an amortization schedule & payment calculator?
Using Angular for easy display and such. Useful tool and a fun JS exercise.. What is a amortization schedule & payment calculator? How do you make a amortization schedule & payment calculator? This script and codes were developed by Bryan Fillmer on 11 December 2022, Sunday.
Amortization Schedule & Payment Calculator - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Amortization Schedule & Payment Calculator</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootswatch/3.2.0/flatly/bootstrap.min.css'> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ body { padding: 2em;
}
section { max-width: 33em; margin: 0 auto;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <body ng-app="AmortApp"> <section ng-controller="AmortCalc as calc"> <h2>Amortization Schedule & Payment Calculator</h2> <form class="form-horizontal"> <fieldgroup> <legend>Loan Information</legend> <ul class="list-unstyled"> <li class="form-group"> <label class="col-sm-4 control-label">Principal</label> <div class="col-sm-6"><input type="number" class="form-control" ng-model="calc.principal" ng-change="calc.calcMonthlyPaymentAmount()"></div> </li> <li class="form-group"> <label class="col-sm-4 control-label">Annual Interest Rate</label> <div class="col-sm-3"><input type="number" class="form-control" placeholder="0.0%" ng-model="calc.interest" ng-change="calc.calcMonthlyPaymentAmount()"></div> </li> <li class="form-group"> <label class="col-sm-4 control-label">Years</label> <div class="col-sm-3"><input type="number" class="form-control" ng-model="calc.payments" ng-change="calc.calcMonthlyPaymentAmount()"></div> </li> </ul> <h4 class="row" ng-show="calc.monthlyPaymentAmount"> <div class="col-sm-6 text-muted">Per Month Payment:</div> <div class="col-sm-6">{{calc.monthlyPaymentAmount | currency}}</div> <div class="col-sm-6 text-muted">Total Payout:</div> <div class="col-sm-6">{{calc.totalPayoutAmount | currency}}</div> <div class="col-sm-6 text-muted">Total Interest:</div> <div class="col-sm-6">{{calc.totalInterestAmount | currency}}</div> </h4> </fieldgroup> </form> </section>
</body> <script src='http://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Amortization Schedule & Payment Calculator - Script Codes CSS Codes
body { padding: 2em;
}
section { max-width: 33em; margin: 0 auto;
}
Amortization Schedule & Payment Calculator - Script Codes JS Codes
(function () { /** * * @TODO * 1. Reduce watch frequency on monthly calculation. * 2. Refactor a bit for more sense. * 3. That whole schedule thing. * 4. Form element validation checking. * */ angular.module('AmortApp', [ ]); var AmortCalc = function () { var vm = this; vm.principal = null, vm.interest = null, vm.payments = null, vm.monthlyPaymentAmount = null, vm.totalPayoutAmount = null, vm.totalInterestAmount = null, vm.remainingBalance = null; var monthlyPayment = function (p, i, n) { return ( i * p * Math.pow(1 + i, n) ) / ( Math.pow(1 + i, n) - 1 ); }; var monthlyInterest = function (i) { return (i / 100) / 12; }; vm.calcMonthlyPaymentAmount = function () { if (null === vm.principal || null === vm.interest || null === vm.payments) { return null; } var mInterest = monthlyInterest(vm.interest); vm.monthlyPaymentAmount = monthlyPayment(vm.principal, mInterest, (vm.payments * 12)); vm.totalPayoutAmount = vm.monthlyPaymentAmount * (vm.payments * 12); vm.totalInterestAmount = vm.totalPayoutAmount - vm.principal; }; }; angular.module('AmortApp', [ ]).controller('AmortCalc', AmortCalc);
})();

Developer | Bryan Fillmer |
Username | bfillmer |
Uploaded | December 11, 2022 |
Rating | 3 |
Size | 2,961 Kb |
Views | 12,138 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Toggle Overlay on UL | 2,509 Kb |
Simple Number Element Controls Demo | 3,384 Kb |
JS Playground | 3,242 Kb |
Useful Loading Overlay | 3,833 Kb |
Continued Angular Testbed | 2,239 Kb |
Attribute Module CSS Grid Mixins | 5,014 Kb |
Project Euler Problem 17 | 2,739 Kb |
Five Programming Problems | 4,091 Kb |
Prototype Angular JS Workout Log | 2,599 Kb |
Flat Toggle Switch | 2,469 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Popup Modal | Aldlevine | 3,696 Kb |
Bezier Animation with straight paths | Rhernando | 2,087 Kb |
Testing Portfolio Page | Sideshowli | 3,395 Kb |
Jquery 2d character movement | Drewtadams | 4,291 Kb |
Intake Form Page 2 | Ijantje | 4,983 Kb |
Improved Page Flipping Effect | Usaphp | 5,201 Kb |
Responsive slide | Thorien | 2,400 Kb |
How to add Css Fold Notes In Blogger By Askwithloud.com | Askwithloud | 2,280 Kb |
Improve | Gavra | 1,652 Kb |
Multi column experiment. | Spylefkaditis | 2,805 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!