Here is my example, how to calculate kcal to kWh and kJ, on an everyday Food.
1 portion rice witch vegetables:

calculation:
313 kcal * 4.19 kJ = 1311.47 kJ
313 kcal / 860 kcal = 0.363953488 kWh
For the calculations i used the following link:
Energieeinheiten (agrarplus.at)
Rahel Künzle, M17a