Math.Rate
---------

Returns the interest rate per period of an annuity.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Math](component_Math.md) | [14.5](newinversion145.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Math.Rate"; Nper; pmt; pv { ; fv; Type; guess } ) 

**MBS**( **"Math.Rate";** /\* Returns the interest rate per period of an annuity. \*/  
**$Nper**; /\* The total number of payment periods in an annuity. \*/   
**$pmt**; /\* The payment made each period and cannot change over the life of the annuity.   
Typically, pmt includes principal and interest but no other fees or taxes. If pmt is omitted, you must include the fv argument. \*/   
**$pv**; /\* The present value — the total amount that a series of future payments is worth now. \*/   
**$fv**; /\* Optional; The future value, or a cash balance you want to attain after the last payment is made.   
If fv is omitted, it is assumed to be 0 (the future value of a loan, for example, is 0). If fv is omitted, you must include the pmt argument. \*/   
**$Type**; /\* Optional; The number 0 or 1 and indicates when payments are due.  
0 or omitted: At the end of the period  
1: At the beginning of the period \*/   
**$guess**) /\* Optional; Your guess for what the rate will be.  
\* If you omit guess, it is assumed to be 10 percent.  
\* If RATE does not converge, try different values for guess. RATE usually converges if guess is between 0 and 1. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Nper | The total number of payment periods in an annuity. |  |  |
| pmt | The payment made each period and cannot change over the life of the annuity.    Typically, pmt includes principal and interest but no other fees or taxes. If pmt is omitted, you must include the fv argument. |  |  |
| pv | The present value — the total amount that a series of future payments is worth now. |  |  |
| fv | The future value, or a cash balance you want to attain after the last payment is made.    If fv is omitted, it is assumed to be 0 (the future value of a loan, for example, is 0). If fv is omitted, you must include the pmt argument. |  | Optional |
| Type | The number 0 or 1 and indicates when payments are due.   0 or omitted: At the end of the period   1: At the beginning of the period |  | Optional |
| guess | Your guess for what the rate will be.   \* If you omit guess, it is assumed to be 10 percent.   \* If RATE does not converge, try different values for guess. RATE usually converges if guess is between 0 and 1. |  | Optional |

### Result

Returns OK or error.

### Description

Returns the interest rate per period of an annuity.  
Should be same as Rate() function in Excel.  
RATE is calculated by iteration and can have zero or more solutions. If the successive results of RATE do not converge to within 0.0000001 after 20 iterations, RATE returns an error.  
See also:  
<https://support.microsoft.com/en-us/office/rate-function-9f665657-4a7e-4bb7-a030-83fc59e748ce>  
### Examples

Do a test calculation:

 Set Variable \[ $LoanAmount ; Value: 8000 \]  
Set Variable \[ $MonthlyPaymentAmount ; Value: 152,5 \]  
Set Variable \[ $NumberOfYears ; Value: 5 \]  
Set Variable \[ $NumberOfPeriods ; Value: 60 \]  
Set Variable \[ $PaymentPeriodsPerYear ; Value: 12 \]  
Set Variable \[ $Rate ; Value: MBS ("Math.Rate"; $NumberOfPeriods ; -$MonthlyPaymentAmount ; $LoanAmount ) \]  
Set Variable \[ $Rate ; Value: Round ( $Rate \* 100; 2 ) \]  
Show Custom Dialog \[ "Rate" ; "Monthly: " &amp; $Rate &amp; "%" // shows .45% &amp; ¶ &amp; "Annually: " &amp; ($Rate \* $PaymentPeriodsPerYear ) &amp; "%" \]  
Calculate yearly rate:

 Let(\[  
LoanAmount = 14076;  
MonthlyPaymentAmount = 264.34 ;  
NumberOfYears = 5;  
NumberOfPeriods = 60;  
PaymentPeriodsPerYear = 12;  
Rate = MBS ("Math.Rate"; NumberOfPeriods; -MonthlyPaymentAmount; LoanAmount); // monthly  
Rate = ((1 + Rate)^12-1); // yearly  
Rate = Round ( Rate \* 100; 2 ) // rounded  
\]; Rate)  
Calculate rate with end value:

 Let(\[  
LoanAmount = -13324.46 ;  
MonthlyPaymentAmount = 181.34 ;  
NumberOfYears = 5;  
NumberOfPeriods = 60;  
PaymentPeriodsPerYear = 12;  
EndValue = 5196.19 ;  
Rate = MBS ("Math.Rate"; NumberOfPeriods; MonthlyPaymentAmount; LoanAmount; EndValue; 0); // monthly  
RateYearly = ((1 + Rate)^12-1); // yearly  
RateYearly = Round ( RateYearly \* 100; 2 ) // rounded  
\]; RateYearly)  
<small>  
Example result: 5.94</small>### Release notes

- **Version 14.5**
    - Added [Math.Rate](https://www.mbsplugins.eu/MathRate.shtml) function.

### Example Databases

- [Math/Rate calculation](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Math/Rate%20calculation.shtml#12912FieldAnchor_)

### Blog Entries

- [New in MBS FileMaker Plugin in Version 14.5](https://www.mbsplugins.de/archive/2025-01-08/New_in_MBS_FileMaker_Plugin_in/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 14.5 für Claris FileMaker](https://www.mbsplugins.de/archive/2024-11-12/Neues_MBS_Plugin_145_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 14.5 for Claris FileMaker](https://www.mbsplugins.de/archive/2024-11-12/MBS_FileMaker_Plugin_145_for_C/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 14.5pr3](https://www.mbsplugins.de/archive/2024-10-17/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 9th October 2024 , last changed 23th November 2024

  
[Math.Random.PoissonDistribution](MathRandomPoissonDistribution.md) - [Math.Reciprocal](MathReciprocal.md)

[HTML Version](MathRate.shtml)