# Understand Fert vAPY

The Beanstalk UI displays vAPY (*variable* AP&#x59;*)* statistics for Fertilizer. APYs are called *variable* because they are not enforced by Beanstalk in any way. Rather, the APY uses historical data about Beans earned by Fertilizer holders to estimate future returns.

The APY calculation has two parts:

1. Estimating the number of Beans that will be minted per Season using recent historical data.
2. Estimating the number of Beans that a Farmer will receive over time for holding Fertilizer. This takes some [assumptions](#estimating-vapy-for-silo-deposits) about Fertilizer holder behavior.

### Fert vAPY

Fertilizer holder earn Bean seignorage when [deltaB](/almanac/protocol/glossary.md#deltab) is greater than 0 over the previous Season. Estimated annual Beans earned by a Fertilizer holder is called the **Fert vAPY**.

### Estimating Sprouts Fertilized per Season

The Beanstalk UI and Subgraph use a 30-day [exponential moving average](https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average) (EMA) of Beans earned by Fertilizer holders to estimate future returns. The formula uses a weighted average in which recent Seasons are weighted more heavily.

The current EMA value can be located on the Barn page by hovering over the **Fert vAPY**.

### Estimating vAPY for Fertilizer

The vAPY is determined by the estimated return of holding Fertilizer in 8760 Seasons (1 year).

The vAPY calculation makes the following assumptions:

* No more Available Fertilizer is purchased; and
* No Active Fertilizer becomes Used.

### Calculations

#### Exponential Moving Average (EMA)

The window of the EMA ($$u$$), i.e., the number of Seasons in 30 days:

$$
u = 24 \* 30 = 720
$$

The weighting multiplier ($$\beta$$);  a constant between 0 and 1 that determines how much weight is given to the most recent data point:

$$
\beta=\frac{2}{(u+1)}
$$

The 30-day exponential moving average at Season $$t$$ ($$\bar{n}^e\_t$$): &#x20;

$$
\bar{n}^e\_t = \beta \sum\_{i=t-u}^{i \leq t}(1-\beta)^{t-i} n^e\_{i}
$$

#### Fert vAPY

The formulas for the Fert vAPY ($$\text{vAPY}^{\text{Fert}}$$​) take the following variables as inputs:

* $$\bar{n}^e\_t$$, the 30-day EMA of Beans earned by Fertilizer holders at Season $$t$$​;
* $$h$$, the Humidity at Season $$t$$​; and
* $$F$$, the Active Fertilizer supply.

$$\text{vAPY}^{\text{Fert}}$$​ is calculated using the estimated number of Beans owned by the Fertilizer holder a year from now (8760 Seasons from now).

First, calculate the delta Beans earned per Fertilizer ($$\text{dBPF}$$​):

$$
\text{dBPF}=\frac{\bar{n}^e\_t}{F}
$$

We define $$\text{vAPY}^{\text{Fert}}$$​ as:

$$
\text{vAPY}^{\text{Fert}}=(\frac{h}{
\frac{1 + h}{\text{BPF}} \div 8760})
$$


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bean.money/almanac/guides/barn/understand-fert-vapy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
