Integrated production and maintenance planning optimizes efficiency and productivity by coordinating schedules. Investigating this planning can improve operational efficiency, reduce costs, and enhance productivity. It reduces equipment breakdowns, minimizes downtime and delays, and facilitates better resource allocation, thereby lowering costs and enhancing cash flow. On the other hand, human error can significantly affect maintenance operations, reducing performance. This paper introduces a novel mathematical model aimed at cost minimization through the optimization of preventive maintenance (PM) operation planning, production scheduling, and the consideration of human error. Unlike prior research, this research accounts for the influence of human error on both the reduction coefficient of equipment virtual age and associated costs. Besides, this paper categorizes the costs linked to maintenance operations into two distinct groups. The results help decision-makers implement optimal production and maintenance operations in organizations, taking human error into account. Optimal and integrated maintenance and production planning that takes into account human error can have a significant impact on sustainability in several ways. The model is tested in the real world and validated using the sensitivity analysis method. The results suggest that the optimal human error probability, based on its costs, is equal to 0.00005. This finding encourages decision-makers to identify sources of human error and develop proactive measures to optimize performance. Overall, the model can help organizations optimize production and maintenance operations, reduce costs, and improve performance.