A social networking system selects and presents content items to a user via a feed. Additionally, the social networking system predicts heights associated with various content items, such as content items selected for presentation via the feed. Characteristics of a content item (e.g., a type of content included in the content item, a language of the content item, and a number of comments associated with the content item) as well as characteristics of a client device associated with the user are used to predict a height associated with the content item. When selecting content items for presentation to the user, the social networking system accounts for the predicted heights of various content items when ordering the content items in the news feed