"Hence" is not especially formal. It means either "consequently" or "in the future"."Ergo" also means "consequently" or "therefore", but it is Latin rather than native English and is indeed more formal, and actually old=fashioned. It might have appeared in mathematical or logical arguments, but even in academic contexts, a word such as "therefore" or "hence" would probably be preferred these days.