What is the cost of completely rewiring a 2 bedroom ground floor flat?

We are looking to put in an offer in a 2 bed flat built 1960's. Wiring has not been updated since then. It looks like the homeowner has had a stab at it themselves, resulting in what loooks like a fire hazard.
As far as I'm aware absolutely everything needs replaced: wiring, sockets, lighting, box... even the connection of the electric shower unit looks haphazard.
I would like to find out the approximate cost of this work prior to putting in an offer.