A loan and interest calculation plugin for jQuery.

About Demos Documentation Download

What is it?

Accrue.js is a jQuery plugin for providing loan and interest calculations on web pages. It's small, fast, flexible, and forgiving.

Small: The minified version of the plugin is under 5kb.

Fast: It loads and executes quickly, and instantly provides results as your user types.

Flexible: Don't want it to calculate on keyup? There's a setting for that. Want to execute your own code every time the the tool calculates? Just provide a callback function. With every setting in the plugin accessible, you can completely customize the experience.

Forgiving: If you don't provide it with fields that are required to perform calculations, it will add them to the bottom of the form. If you don't provide it with a form or results div to begin with, you guessed it - it creates them. It will operate when trained on a completely empty div or use any fields you provide yourself.

Check out the demos to see what it can do.


Enough talk, let's check out some demos!

Basic Loan Calculation

Grabs three values from the form, and returns general information about a loan.

Interest Savings Calculation

Grabs four values from the form, and returns general information about a loan.

Amortization Schedule Calculation

Grabs three values from the form, and displays a complete amortization schedule for the provided loan information.



Accrue.js is a jQuery plugin, so it requires a version of jQuery to be installed. The only other file you need to get started is jquery.accrue.min.js.


  • jQuery 1.10+ (and legacy 1.4.0+) - Recommend Latest
  • A bit of CSS knowledge couldn't hurt.

A Note About Styles

The example.css file that's included in the repo is NOT intended to be used with the plugin - it mainly contains styles for the example page, and while some of those styles affect the calculator elements, most of them do not and would just add unnecessary code to your codebase.

To keep the plugin small and flexible, it doesn't include a stylesheet at all, allowing you to set any styles you need/want.


There are a ton of plugin options and ways to customize your calculators, but for this chunk of code, we'll just focus on the bare minimum of what you need to start seeing a working calculator:

More Documentation

View the wiki for detailed instructions about any of the calculator modes and all the additional options and features.

View the Wiki

Download Accrue.js

Visit the project on Github for updates or just download the source and dig in!

Accrue.js on Github Download Latest