The paper discusses how the level of assembly line automation affects the production cost function. The paper introduces to the issue of Industry 4.0 that is associated with topic of automation. Afterwards three levels of automation are described (that the paper is concentrated on) - manual (no automation), semi-automated (partial automation) and complete automation. In the main part, the paper analyses the components of production cost function and for each component identifies the factors that need to be taken into account and which can influence the calculation of the production cost function. Not only the factors but also their influence to the components of production cost function is described in the paper. The target of the paper is to show that evaluating of the investment in automation by calculating the production costs is more accurate and convenient than simply calculating ROI. By ROI calculation a lot of important factors and influences can be overlooked.