As others have pointed out, the fusion reactions inside the sun and man-made on Earth are exothermic. Per mass of reactant, they release far more energy than any chemical reaction, and even more energy than fission.
Even the experimental reactors technically produce energy. If you take the Q=0.67 result from JET, then 24MW went in, 16MW was generated, and 40MW came out. For ITER, the projection is 50MW in, 500MW out.
But both of these are a long way from being economical. ITER is not even designed to generate electricity, but if it was, it would struggle to generate more than it consumes. That 50MW to heat the plasma comes from complex machines (fancy microwaves and particle beams) that run on electricity, with about 50% efficiency. So the input in terms of electricity is 100MW. On the output side, you have to deal with the Carnot efficiency, so that 500MW of heat will only generate about 200MW of electricity (40% efficiency). By the time you run pumps for the reactants, exhaust, coolant for the superconducting coils, a whole bunch of measurements... there's not a lot left over.
So a fusion reactor based on the ITER design that produces electricity has to be much larger. Designs at the moment aim for about 3000MW of energy for an output of 1000MW net electricity. Based on those designs you can start talking economics, but it's complicated. That reactor has cheap fuel, but expensive components. Superconducting coils, microwaves, radiation protection... it's hard to predict what the end cost of electricity would be based on these costs if we're still figuring out how to build the reactor.
As others have pointed out, the sun doesn't care about economics. Hasn't turned a profit in millennia. And by human standards of power density it is actually fantastically inefficient. But that's fine by me. It's about the right amount of power to keep Earth in a stable life-supporting temperature range.