Planning to build a new house or rebuild your home? How do you know what it will cost?

Planning to build a new house or rebuild your home? How do you know what it will cost?