The Algeria international has been in sparkling form this season, but has twice missed from the spot to cause Leicester City to drop Premier League points.
Mahrez's effort was saved by Mark Bunn in the 1-1 draw with Villa and he also failed to convert against AFC Bournemouth in a 0-0 draw on January 2.
"He was a little sad. I said to him: 'Come on man, even champions miss penalties, just concentrate on keeping your form going'," Ranieri said.
"I said: 'You have to stay calm. Don't worry, I'm happy with you. It doesn't matter'.
"It was a good chat with him. I spoke to him and said I'm going to change things for now to take the pressure off and when I think the time is right I'd give it back to him.
"I don't know who is going to take them. I will speak to the players. Leo Ulloa took some last season but it could be Jamie Vardy, I will speak to him."
Leicester are expected to complete the signing of Ghana international Daniel Amartey in the coming days but Ranieri would not be drawn on when the transfer will be completed.
"I will only speak when players actually join us. Until then people must wait. But I do want good players and Amartey is one of those," he said.
Leicester host Tottenham in the FA Cup third-round replay at the King Power Stadium on Wednesday.