In this paper, an economic-mathematical theory of media planning is developed. Within the framework of this theory, the concept of the risk of advertising in the media is defined; a technique for its calculation is provided. In the article, the dependencies of the risk of placement of advertisements on their number are presented. Risk calculation is carried out using both analytical and numerical methods. The article provides the proof of the recurrence relation for audience reach, introduces probability distribution for the number of contacts with media considered as a random variable; the expectation and variance of the number of contacts with media are calculated; the comparison of the exact and approximate number of advertisement placements necessary for effective advertisement is performed. The results obtained can be used in planning the actual advertising campaigns.