There are six types of nutrients that are generally listed as nutrients that the body needs. Those six are carbohydrates, proteins, fats, minerals, vitamins, and water.
If the question is asking about calories per gram of intake, then water, vitamins, and minerals offer the least amount of energy. They have zero calories. That doesn't mean they are useless though. Your body needs those nutrients in order to maintain optimal health and wellness.
Of the calorie providing nutrients, carbohydrates and proteins both provide four calories per gram. They are equal in energy density. Fats provide nine calories per gram; therefore, fats have more than twice the energy density of carbohydrates and proteins. That definitely doesn't mean that a person should only eat fats though. A balanced diet that contains the proper amounts of all six nutrients is the most beneficial to overall health.