Interactive
Loan Calculator
Sliders for the amount and the term, with the repayment worked out live. One element, configured for different lenders.
Live demo
See it in action
Three set-ups of the same element: a car loan with a deposit, a short weekly loan at a flat rate, and contract purchase with a final payment. Move the sliders.
Car loan
- Monthly payment
- $316.43
- Total to repay
- $15,188.75
- Cost of credit
- $2,688.75
These figures are illustrative and for planning only. What you are offered depends on your circumstances.
Short-term loan
- Weekly payment
- $26.53
- Total to repay
- $689.70
- Cost of credit
- $89.70
These figures are illustrative and for planning only. What you are offered depends on your circumstances.
With a final payment
- Monthly payment
- $446.51
- Total to repay
- $25,674.39
- Final payment
- $9,600.00
These figures are illustrative and for planning only. What you are offered depends on your circumstances.
The markup
Clean, lean code
This is the exact HTML the element outputs, straight from the page builder. No wrapper soup, no inline-style bloat.
<div class="fw-loan-calc-wrap fw-loan-calc fw-loan-calc--card" data-loan-calc="{"formula":"amortised","unit":"months","balloon":35,"rate":9.9,"symbol":"$","position":"before","words":["month","months"],"pass":false}">
<h3 class="fw-loan-calc__title">Car loan</h3>
<div class="fw-loan-calc__fields">
<div class="fw-loan-calc__field">
<div class="fw-loan-calc__field-head">
<label class="fw-loan-calc__label" for="lc-a2119269-amount">Car price</label>
<output class="fw-loan-calc__value" for="lc-a2119269-amount" data-lc-out="amount">$14,000</output>
</div>
<input class="fw-loan-calc__range" type="range" id="lc-a2119269-amount" name="amount" min="3000" max="40000" step="500" value="14000" style="--lc-fill:29.73%">
</div>
<div class="fw-loan-calc__field">
<div class="fw-loan-calc__field-head">
<label class="fw-loan-calc__label" for="lc-a2119269-term">Term</label>
<output class="fw-loan-calc__value" for="lc-a2119269-term" data-lc-out="term">48 months</output>
</div>
<input class="fw-loan-calc__range" type="range" id="lc-a2119269-term" name="term" min="12" max="60" step="6" value="48" style="--lc-fill:75%">
</div>
<div class="fw-loan-calc__field">
<div class="fw-loan-calc__field-head">
<label class="fw-loan-calc__label" for="lc-a2119269-deposit">Deposit</label>
<output class="fw-loan-calc__value" for="lc-a2119269-deposit" data-lc-out="deposit">$1,500</output>
</div>
<input class="fw-loan-calc__range" type="range" id="lc-a2119269-deposit" name="deposit" min="0" max="10000" step="250" value="1500" style="--lc-fill:15%">
</div>
<div class="fw-loan-calc__field">
<div class="fw-loan-calc__field-head">
<label class="fw-loan-calc__label" for="lc-a2119269-rate">Try a rate</label>
<output class="fw-loan-calc__value" for="lc-a2119269-rate" data-lc-out="rate">9.9%</output>
</div>
<input class="fw-loan-calc__range" type="range" id="lc-a2119269-rate" name="rate" min="4" max="30" step="0.1" value="9.9" style="--lc-fill:22.69%">
</div>
</div>
<dl class="fw-loan-calc__results" aria-live="polite">
<div class="fw-loan-calc__row fw-loan-calc__row--main">
<dt>Monthly payment</dt>
<dd data-lc="payment">$316.43</dd>
</div>
<div class="fw-loan-calc__row">
<dt>Total to repay</dt>
<dd data-lc="total">$15,188.75</dd>
</div>
<div class="fw-loan-calc__row">
<dt>Cost of credit</dt>
<dd data-lc="interest">$2,688.75</dd>
</div>
</dl>
<a class="fw-loan-calc__btn btn btn-primary" href="#" data-lc-btn>Apply now</a>
<p class="fw-loan-calc__note">These figures are illustrative and for planning only. What you are offered depends on your circumstances.</p>
</div>To learn more about the Loan Calculator shortcode, please check out the online manual here.
Free & open source
Build with this element, free.
Install the framework and the Bootstrap 5 theme, then drag this element into any page.