The transport sector is one of the main barriers to achieving the European Union’s climate protection objectives. Therefore, more and more restrictive legal regulations are being introduced, setting out permissible limits for the emission of toxic substances emitted into the atmosphere, promoted biofuels and electromobility. The manuscript presents a computer tool to model the total energy consumption and carbon dioxide emissions of vehicles with an internal combustion engine of a 2018 Toyota Camry LE. The calculation tool is designed in the OpenModelica environment. Libraries were used for this purpose to build models of vehicles in motion: VehicleInterfaces, EMOTH (E-Mobility Library of OTH Regensburg). The tool developed on the basis of actual driving test data for the selected vehicle provides quantitative models for the instantaneous value of the fuel stream, the model of the instantaneous value of the carbon dioxide emission stream as a function of speed and the torque generated by the engine. In the manuscript, the tests were conducted for selected driving cycles tests: UDDS (EPA Urban Dynamometer Driving Schedule), HWFET (Highway Fuel Economy Driving Schedule), EPA US06 (Environmental Protection Agency; Supplemental Federal Test Procedure (SFTP)), LA-92 (Los Angeles 1992 driving schedule), NEDC (New European Driving Cycle), and WLTP (Worldwide Harmonized Light-Duty Vehicle Test Procedure). Using the developed computer tool, the impact on CO2 emissions was analyzed in the context of driving tests with four types of fuels: petrol 95, ethanol, methanol, DME (dimethyl ether), CNG (compressed natural gas), and LPG (liquefied petroleum gas).