Marginal Loss Factors (MLFs) are widely utilised in electricity markets as a mechanism for representing the financial impact of electrical losses within transmission networks. They provide economic signals to industry and play a crucial role in maintaining efficient electricity markets. Industry confidence in the accuracy of MLFs is crucial to ensure the associated economic signals function as intended. Providing industry with accessible tools to calculate MLFs will increase transparency and confidence in the accuracy of information and the economic signals they convey. This paper presents a comparison of modern power system analysis tools to determine the accuracy of MLFs calculated using loss sensitivity, the most widely used method for calculating MLFs in modern algorithms. An algorithm is then developed using open-source software to drive widely used power system analysis tools to calculate MLFs for electricity markets. The algorithm is evaluated on the Australian National Electricity Market (NEM) network model using actual data from Australia's power system.