McCarthy adopted a 4-4-2 system for the majority of the first half of the campaign but quickly became aware his side were leaking too many goals and also not scoring enough as they slipped into the lower reaches of the table.
He then decided to make the switch to 4-5-1 in a bid to make his side tougher to beat and it has paid handsome dividends.
Wolves will now go into Saturday's home clash with Blackburn knowing a win should guarantee top-flight football for another campaign.
They are currently six points ahead of 18th-placed Hull with three games to go and have a vastly-superior goal difference.
McCarthy said: "With 4-4-2, we had actually won at Tottenham and drawn at Everton but for the home game with Liverpool I decided to change to 4-5-1.
"It is a sign of madness if you keep doing the same things and get beat and we needed to be harder to beat.
"Everyone was telling me it should be done apart from the people at the training ground and the players who bought into it.
"But it is a fact that if you don't score a lot of goals and keep leaking them then it will be difficult to survive.
"Since we changed the formation, we have become harder to beat and Kevin Doyle has done a splendid job playing as the lone striker."
McCarthy refuses to start contemplating survival until it is mathematically impossible for Wolves to be overtaken and slip back into the bottom three.
He said: "Three points on Saturday will do it for us but I'm not going to start thinking about that or talking about that. At this moment it is still all hypothetical.
"It's nice for it to be in our own hands which is what we wanted, but Blackburn won't be coming here just to roll over and give us the points."
Wolves midfielder Matt Jarvis is doubtful for the visit of Sam Allardyce's side.
Jarvis sustained a thigh injury during the latter stages of the goalless draw at Fulham last weekend and has still not fully recovered.