Contextual advertising is a textual advertising displayed within the content of a generic web page. Predicting the probability that users will click on ads plays a crucial role in contextual advertising because it influences ranking, filtering, placement, and pricing of ads. In this paper, we introduce a click-through rate prediction algorithm based on the learning-to-rank approach. Focusing on the fact that some of the past click data are noisy and ads are ranked as lists, we build a ranking model by using partial click logs and then a regression model on it. We evaluated this approach offline on a data set based on logs from an ad network. Our method is observed to achieve better results than other baselines in our three metrics.