Diesel engines are required to reduce exhaust emissions during real-world operations. In this regard, a new control concept called model-based control has been explored. Unlike the conventional method of relying on steady-state measurements, model-based control allows cycle-bycycle optimization of control inputs based on physical principles. Existing models for combustion control have been using empirical equations to predict polytropic index for the compression stroke for estimation of in-cylinder pressure and temperature at fuel injection. Therefore, in this study, a polytropic index prediction model was developed in MATLAB to maintain the engine performance under transient conditions and to reduce the required number of experiments. The model includes a heat loss model and a gas flow model to consider the effect of wall heat transfer and gas flows inside the cylinder. The computational load of the model was reduced through discretization of a single engine cycle into several calculation points. The model was validated against numerical simulation results under steady conditions first, and then applied to transient conditions for more realistic operational conditions. The model estimated the polytropic index with average errors under steady and transient conditions with 0.22% and 0.37%, respectively. Finally, the calculation time of the model was evaluated to be 50.6 μs. It was concluded the model can be implemented on a model-based controller in the future.