# CFLib.org – Common Function Library Project

## DiscountingInterest(p, r, t)

##### Last updated April 23, 2002

Version: 1 | Requires: ColdFusion 5 | Library: FinancialLib

Rated 0 time(s). Average Rating: 0

Description:
Calculate the actual value of an amount by discounting the interest over n years.

Return Values:
Returns a numeric value.

Example:

<cfoutput>
\$133.10 discounted at 10% over 1 year: #discountingInterest(0.1, 133.1, 1)#<br>
\$133.10 discounted at 10% over 2 years: #discountingInterest(0.1, 133.1, 2)#<br>
\$133.10 discounted at 10% over 3 years: #discountingInterest(0.1, 133.1, 3)#
</cfoutput>

Parameters:

Name Description Required
p Principal Yes
r Interest rate (0.03 = 3%) Yes
t Time in years. Yes

Full UDF Source:

``` function toggle_view_C1887051EC8328D9B97360C54828E627() { var temp = document.getElementById('htmlencoded_plain_C1887051EC8328D9B97360C54828E627').style.display; document.getElementById('htmlencoded_plain_C1887051EC8328D9B97360C54828E627').style.display=document.getElementById('formatted_code_C1887051EC8328D9B97360C54828E627').style.display; document.getElementById('formatted_code_C1887051EC8328D9B97360C54828E627').style.display=temp; if (temp=='none') { document.getElementById('view_C1887051EC8328D9B97360C54828E627').innerHTML='formatted'; } else { document.getElementById('view_C1887051EC8328D9B97360C54828E627').innerHTML='view plain'; } } function copy_to_clipboard_C1887051EC8328D9B97360C54828E627() { var code=unescape(document.getElementById('htmlencoded_plain_C1887051EC8328D9B97360C54828E627').innerHTML).replace(/&lt;/g, '\x3C').replace(/&gt;/g, '\x3E').replace(/&amp;/g, '\x26').replace(/\x3Cbr\x3E/gi, '\r\n').replace(new RegExp('&nbsp;&nbsp;&nbsp;&nbsp;', 'gi'), '\t'); window.clipboardData.setData('text',code); } function print_C1887051EC8328D9B97360C54828E627() { document.getElementById("print_frame_C1887051EC8328D9B97360C54828E627").contentWindow.document.body.innerHTML = document.getElementById('formatted_code_C1887051EC8328D9B97360C54828E627').innerHTML; document.getElementById("print_frame_C1887051EC8328D9B97360C54828E627").contentWindow.focus(); document.getElementById("print_frame_C1887051EC8328D9B97360C54828E627").contentWindow.print(); } function show_about_C1887051EC8328D9B97360C54828E627() { document.getElementById('about_C1887051EC8328D9B97360C54828E627').style.display='block'; window.setTimeout('hide_about_C1887051EC8328D9B97360C54828E627();', 4000); } function hide_about_C1887051EC8328D9B97360C54828E627() { document.getElementById('about_C1887051EC8328D9B97360C54828E627').style.display='none'; } view plain if(window.clipboardData) { document.getElementById('view_copy_to_clipboard_link_C1887051EC8328D9B97360C54828E627').style.display='inline';} print about <cfscript>/** * Calculate the actual value of an amount by discounting the interest over n years. *  * @param p      Principal  * @param r      Interest rate (0.03 = 3%)  * @param t      Time in years.  * @return Returns a numeric value.  * @author Stephan Scheele (stephan@stephan-t-scheele.de)  * @version 1.0, April 23, 2002  */function DiscountingInterest(r, p, t){ return (p / (1 + r)^t);}</cfscript> ```

### Search CFLib.org

composeDateTime
18 day(s) ago

convertQueryStri...
a while ago

arrayDiff
a while ago

ArrayOfStructsSo...
a while ago

### Top Rated

backupDatabase
Rated 5.0, 36 time(s)

indentXml
Rated 5.0, 10 time(s)

deAccent
Rated 5.0, 6 time(s)

countArbitraryDa...
Rated 5.0, 5 time(s)

Created by Raymond Camden / Design by Justin Johnson