ACCRINT
Financial

Returns the accrued interest for a security that pays periodic interest

Syntax:

=ACCRINT(issue, first_interest, settlement, rate, par, frequency, [basis])

Example:

=ACCRINT("1/1/2023", "3/1/2023", "12/31/2023", 0.1, 1000, 4)