Advertised rent is usually monthly, but ownership costs continue even with no tenant. To estimate the yield, project the months actually collected.
An example with numbers
With a total purchase cost of $200,000 and rent of $1,000 a month, twelve months would give a 6% gross yield. If you collect eleven months and pay $2,000 of annual running costs, $9,000 is left, 4.5% before financing and taxes.
Try it with your numbers
Build three occupancy scenarios with the same purchase cost. Mark which costs continue even when the property is empty.
This calculator is on its way. In the meantime, you can do the calculation on paper or in a spreadsheet.
Example figures for learning purposes. They are not a recommendation and do not replace professional advice.