Hybridization of electricity, heat power, and transportation energy combines the advantages of multi-energy sources. This paper proposes the combined use of fuel cell, combined heat and power units (CHP), hot water tank storage, gas boiler and photovoltaic (PV) generators to meet the electrical, thermal and transportation electrification energy demands in an eco-friendly multienergy microgrid. An optimal energy balance methodology is proposed in this paper for sizing the capacity of fuel cell, CHP, gas boiler, and PV. The method is to minimize the total annual cost and emissions of the whole system, based on hourly electrical and thermal load profile. The methodology can be used as a planning tool for multi-energy systems.