I did a whole university study on this. What we found was that it was unrealistic to take a part of a "network" which relies on integration, and say that there were bits that were "profitable", and other bits that were not.
Given that it was in the aftermath of Beeching, we developed, much as it was never fashionable (and still isn't), a considerable regard for what Beeching, and in particular his Chief Economist Stewart Joy, wrote about all this. They tipped us off on several issues. One example was Edinburgh Waverley station, huge number of staff, expensive to run. Proposals to withdraw "loss making" services from there showed they were being hit with big costs from running the station, which would not really be obviated if the branch was withdrawn. Trouble was pretty much all the services there were like this, the only one "profitable" was the main ECML, and if you stuck that with all the costs of Waverley (and Newcastle, etc) that too would show a loss.
But the fact was that the network factor on costs (like this big station) were much more embedded than the revenue. I paid particular attention to what they said about Taunton, where the branches to Minehead and Barnstaple were down for closure. Feeders to the main line services? Well, actually, when you looked at the numbers, they weren't, certainly not enough to justify their costs. Nor were there local passengers either. The fact was that by the early 1960s the bulk of these branch trains did nothing more than convey fresh air - and by all accounts the Barnstaple line had mainly done that ever since it was built. Yes, there were one or two of the about eight services a day that maybe arrived with 50 passengers, or the Minehead in August, but they were overwhelmed by the majority that were just empty.