The present investigation aims to analyse the effective utilisation and losses of available energy in a compression ignition (CI) engine using diesel,10% and 20% blends of karanja oil (K10, K20) with different engine loads and compression ratios. Exergy and energy analysis is carried out and performance parameters are compared. The results show that thermal efficiency for K10 was 6.08% higher compared to diesel. Exergy efficiency for diesel, K10 and K20 was recorded as 25.87%, 27.36% and 25.26%, respectively. For K10 exergy efficiency was 5.76% higher compared to diesel. Exergy analysis shows that the maximum fuel chemical exergy is lost in the engine, which represents about 65–70% of the total exergy in the overall system for all tested fuels. The K10 blend is recommended as fuel for CI engines based on its optimum results compared to diesel. HIGHLIGHTS From the present investigation the following points should be noted: Using exergy and energy analysis, efficient utilisation of fuel input energy and various losses are measured directly. Thermal efficiency and exergy efficiency (EE) were found to be improved by 6.08% and 5.76%, respectively, for the lower fuel blend (K10) compared to base fuel diesel under full load condition at a compression ratio of 18:1. Specific fuel consumption is remarkably reduced for all test fuels. K10 results in optimum reduction in fuel consumption which was 2.94% lower compared to base fuel diesel. From exergy and energy analysis, K10 showed better energetic performance (fuel energy input, heat loss and exhaust loss) with equivalent exergetic performance (fuel exergy input, exergetic efficiency and exergy losses) in response to variation in compression ratio and engine load.