> For the complete documentation index, see [llms.txt](https://eggplus.gitbook.io/welcome-to-gitbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eggplus.gitbook.io/welcome-to-gitbook/how-it-works/fixed-apy/how-is-apy-calculated.md).

# How is APY calculated

### Simple interest equation (principal + interest)&#x20;

A = P(1 + rt)

#### where:

A = total accrued amount (principal + interest)&#x20;

P = principal amount I = interest amount&#x20;

r = annual interest rate (decimal); r = R/100&#x20;

R = interest rate percentage per annum; R = r \* 100&#x20;

t = time period involving month or year

According to the basic formula, a = P (1 + rt) is derived from a = P + I, because I = Prt, and then a = P + I becomes a = P + Prt, which can be rewritten as a = P (1 + rt)

Note that rate R and time t should be in the same time unit, such as month or year. The time conversion based on 365 days / year has 30.4167 days / month and 91.2501 days / quarter. 360 days / year has 30 days / month and 90 days / quarter.

### Simple Interest Formula and Calculation:

A = final investment value, using a simple interest formula: A = P (1 + rt), where p is the principal amount invested at the interest rate R% of each period in t time periods. Where R is decimal form; r=R/100; r and t are in the same time unit.

The accrued amount of an investment is the original principal P and accumulated simple interest, I = Prt, so we have:

A = P + I = P + (Prt), lastly A = P (1 + rt)

Calculate the total accrued amount (principal + interest) and solve A&#x20;

A = P(1 + rt)

Calculate the principal and solve P

P = A / (1 + rt)

Calculate the interest rate in decimal system and solve r

r = (1/t)(A/P - 1)

interest rate is calculated as a percentage

R = r \* 100

Calculation for T

.t = (1/r)(A/P - 1)

#### <mark style="color:green;">**Example:**</mark>

P = (principal + interest) = <mark style="color:green;">**$1000**</mark>

A = (total accrual) = <mark style="color:green;">**$**</mark><mark style="color:green;">1,832,940</mark>
