# MDURATION Function

> Calculate the modified Macaulay duration of a bond with MDURATION in TX Sheet Control: settlement, maturity, coupon, yield, frequency, basis and errors.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > MDURATION Function
- **288 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/mduration/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/mduration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/mduration/llms-full.txt

---

Return the modified Macaulay duration of a security with an assumed par value of 100, the percentage change of its price for a change in yield. `settlement` and `maturity` are the settlement and maturity dates, `coupon` the annual coupon rate, `yield` the annual yield and `frequency` the number of coupon payments per year: 1 (annual), 2 (semiannual) or 4 (quarterly). `basis` selects the day count convention: 0 (US 30/360, the default), 1 (actual/actual), 2 (actual/360), 3 (actual/365) or 4 (European 30/360). A settlement date on or after the maturity date, a negative coupon or yield, or another frequency or basis returns `#NUM!`.

### Syntax

```text
MDURATION(settlement, maturity, coupon, yield, frequency, basis)
```

Category: Financial. Minimum arguments: 5. Maximum arguments: 6.

Available for supported offline calculation.

### Examples

```text
=MDURATION(DATE(2026,1,1),DATE(2028,1,1),0.05,0.06,2)
```

The formula returns 1.8711, the Macaulay duration of 1.9272 years divided by 1 + 0.06/2.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [MDETERM Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/mdeterm/llms-full.txt)
- **Next:** [MEDIAN Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/median/llms-full.txt)
