A family of “flow-through” turboexpander-generators (TEGs) has been developed by Calnetix Technologies for hydrogen and natural gas pressure letdown applications. A flow-through TEG includes an axial expansion turbine and can be installed directly between two flanges of an existing pipeline. TEGs can be used to generate power throughout the hydrogen and natural gas transmission infrastructure using existing pressure differentials wherever a Joule-Thomson valve is located. These can be upstream, at terminal stations, and downstream, at governor stations. The expander drives a synchronous permanent magnet high-speed generator supported by active magnetic bearings. This paper describes the innovative axial flow-through system architecture, including the use of process gas for cooling the generator rotor and stator. The primary focus of the paper is the economic analysis of the application. Various TEG subsystem design choices and their impact on cost are discussed, including the generator, bearing, expander wheel, seal, and touchdown bearing resilient mount designs. A payback analysis shows that the natural gas TEG has a payback of 2.1 years when a heat exchanger is required for preheating the gas and 1.9 years when waste heat can be used. The hydrogen TEG has a payback of 2.0 years, and does not require external preheating. Finally, a comparison of this technology with other clean energy solutions is presented, using the Levelized Cost of Electricity (LCOE) formulation. The analysis confirms that the LCOE of the expander-generator ($0.40 per megawatt-hour) compares favorably with other types of conventional and renewable energy technologies on a cost basis.