What are minimum number of moves needed to checkmate a king using king and rook? Assuming that both players do the best move, I want to know the minimum number of moves needed in the worst case scenario when checkmating a lone king using king and rook.

Edit: The worst case does not include "stalemate" or "king able to capture rook" positions, as it will be clearly draw in that cases.
According to this site, the worst case for King + Rook vs. King is the following position, requiring 16 moves to mate (White to move):

[FEN "8/8/8/8/8/2k5/1R6/K7 w - - 0 1"]


There are other positions which require 16 moves, e.g. with the White King on a1, Rook on e2, and the Black King on d3.

You can play these endgames with an online database viewer, e.g. Shredder.

The worst case scenario (for White) with Black to move is when Black is stalemated or can capture the rook, when it is a draw. With White to move, all positions are won.