Skip to content

Modern Finance LoanInterestBetween

Paul Squires edited this page Oct 19, 2026 · 4 revisions

Home › Finance › Finance › LoanInterestBetween

LoanInterestBetween

Returns the interest posted across a range of periods, such as one tax year.

Syntax

LoanInterestBetween( loanTerms, fromPeriod, toPeriod )

Examples

#import "std/money"
using money

'' Interest posted across a range of periods -- what a year-end
'' statement reports.
dim as LoanTerms t = LoanTermsUsMortgage( DecimalParse( "400000" ).Value( ), _
                                          DecimalParse( "0.0595" ).Value( ), 30 )

'' The first year.
print LoanInterestBetween( t, 1, 12 ).Value( ).ToStringFixed( 2 )      '' 23666.23

'' The whole term, which equals the summary's total.
print LoanInterestBetween( t, 1, 360 ).Value( ).ToStringFixed( 2 )     '' 458728.63

'' Adjacent ranges sum to the whole.
dim as Decimal a = LoanInterestBetween( t, 1, 180 ).Value( )
dim as Decimal b = LoanInterestBetween( t, 181, 360 ).Value( )
print ( a + b ).ToStringFixed( 2 )                                     '' 458728.63

Library: Finance
Category: Finance
Documented under: Nothing Becomes A Keyword
Source: pkg/std/money/finloan.tiko in the tiko repository.

Clone this wiki locally