Can I get some advice on how to revise a W4 so that we are not cutting ourselves short and having to owe at the end of the year?

My wife ended up having to owe quite a bit this year and it had wiped out any refund that we would have otherwise been owed.