Repair cost

I’m at tier 2.  Recently I bought a new MKIII mod and and the repair cost from one death racked up from 6k to 10k credits, which for the first time, raised a concern.  Does anyone know what is the repair cost formula?  Is it solely decided on the price of modules and ships?  Is there any "discount’ on repairs for fighters and interceptors compare to frigates, as the the two ship types are more easily to be blown up due to their battlefield roles?

AFAIK there is no fit dependance in repair cost. May be you were lost your ship twice or bought a ship of higher rank?