https://www.cnbc.com/quotes/US6M
Here, the price is given (as of the time of asking) as 5.285, and it is not clear to me how the yield and price here are exactly related. It is clear for me however, how it is done for T-Bonds, using the following formula
$$ \begin{align} P &= \begin{matrix} \left(\frac{C}{1+i}+\frac{C}{(1+i)^2}+ ... +\frac{C}{(1+i)^N}\right) + \frac{M}{(1+i)^N} \end{matrix}\\ &= \begin{matrix} \left(\sum_{n=1}^N\frac{C}{(1+i)^n}\right) + \frac{M}{(1+i)^N} \end{matrix}\\ &= \begin{matrix} C\left(\frac{1-(1+i)^{-N}}{i}\right)+M(1+i)^{-N} \end{matrix} \end{align} $$
as given on https://en.wikipedia.org/wiki/Bond_valuation page on Wikipedia. I cannot see how to use this formula for T-Bills where coupon is zero.