Emergy evaluation (EME) is an environmental assessment method which isgaining international recognition and has increasingly been applied during the lastdecade. Emergy represents the memory of the geobiosphere exergy(environmental work) – measured in solar emjoules (seJ) – that has beenused in the past or accumulated over time to make a natural resource available. Therationale behind the concept of Emergy is the consideration that alldifferent forms of energy can be sorted under a hierarchy and measured with the commonmetric of the seJ, which is then the yardstick through which all energy inputs and outputscan be compared with each other. For this reason EME is suggested to be a suitable methodof environmental accounting for a wide set of natural resources, and can be used to defineguidelines for sustainable consumption of resources. Despite those interesting features,EME is still affected by several drawbacks in its calculation procedures and in itsgeneral methodological background, which prevent it from being accepted by a widercommunity. The main operational hurdle lays in the set of mathematical rules (known asEmergy algebra rules) governing EME, which do not follow logic ofconservation and make their automatic implementation very difficult. This work presents anopen source code specifically created for allowing a rigorous Emergycalculation (complying with all the Emergy algebra rules). Wemodeled the Emergy values circulating in multi-component systems with anoriented graph, formalized the problem in a matrix-based structure and developed a variantof the well-known track summing algorithm to obtain the totalEmergy flow associated with the investigated product. The calculationroutine (written in C++) implements the Depth First Search (DFS) strategy for graphsearches. The most important features of the calculation routine are: (1) its ability toread the input in matrix form without the need of drawing a graph; (2) its rigorousimplementation of the Emergy rules; (3) its low running time, which makesthe algorithm applicable to any system described at the level of detail nowadays madepossible by the use of the available life cycle inventory (LCI) databases. A version ofthe Emergy calculation routine based on the DFS algorithm has beencompleted and is being tested on case studies involving matrices of thousands of rows andcolumns, describing real product production systems.