YIELD
Financial

Returns the yield on a security that pays periodic interest

Syntax:

=YIELD(settlement, maturity, rate, pr, redemption, frequency, [basis])

Example:

=YIELD("2/15/2023", "5/15/2025", 0.057, 95.04287, 100, 2)