A bond calculation values coupon cash flows and the redemption payment using the chosen yield and payment frequency. Price and yield move in opposite directions when the other assumptions are fixed.
Example to check
A $1,000 face-value bond with a 5% annual coupon pays $50 per year. A coupon rate is based on face value, even when the market purchase price differs from $1,000.
Before using the result
Check coupon frequency, settlement assumptions and maturity. Callable bonds, accrued interest, default risk and taxes can make an actual transaction differ from a simplified valuation.