Location is one of the key factors in how much it will cost to build a house, but the house plan (including size, efficiency to build, and designs elements) and the features/amenities play a significant role in cost as well.
Let's take a look at specific elements within these areas that can affect cost.
Size of house
It makes sense that the bigger the house, the more it will cost. Most of the time we talk about the size of a house in terms of the number of square feet of heated and cooled living space. That's what you mean when you say a house is 2,000 square feet—it's 2,000 square feet of living space.
There are other elements that cost money that don't get included in that figure: the garage, front porch, and back patio being the primary extras. It costs nearly as much per square foot to build a garage as a living room, but the garage square footage isn't included in the cost-per-square-foot calculation many of us are familiar with.
Porches and patios are similar. They don't cost as much per square foot as living space, but it still costs money to build a roof and put a concrete slab or deck under it.
Efficiency to build
This one is tough to measure, but there are some rules of thumb, especially for corners. Every time the outside wall or the roof of a house turns a corner, it costs money. Why? Two reasons.
The first is when you build the corner, you have to cut something and throw it away, like lumber, drywall, shingles, carpet, tile, etc. The second is you might actually be able to have more living space without the corners while paying the same price.
Think about a patio that's inset into the back of a house: you still have the roof and the slab. And you actually have more outside wall since the wall has to jog in and then back out, but you cut out living space and made it a patio. Same cost, less living space.
This one is related to efficiency, but it's more about the layout of the interior. For example, a particular kitchen design might have lots of cabinets and countertops, which cost money. If you think in terms of cost per square foot, the kitchen is the most costly element of a house. There's a huge concentration of cost in a small space: cabinets, countertops, appliances, flooring, and lighting. I've seen kitchens with lots of cabinets and countertops that were very expensive while being less efficient and useful than smaller, less costly kitchens.
Features and amenities
This one is pretty straightforward. For a given house plan, the cost to build will vary by thousands and even tens of thousands of dollars with changes in features and amenities. This might include countertop material, paint finishes, moldings, types of flooring, amount and type of cabinets, cost of appliances, and so on.
To give a simple example, I've installed carpet for around $1.70 per square foot, and I've installed hardwood flooring for around $15 per square foot. In a 17 by 20 foot family room, that's a difference of just over $4,500 in one room. Another example is appliance cost: you could choose a nice functional appliance package for just over $1,200, or you could buy the latest high-end package and spend $20,000 or even more.
When trying to figure out the cost to build a house, be sure to consider factors in the floor plan that could increase cost, as well as features and amenities. It's a good idea to start with a list of what's most important to you and then work with your builder to compromise in other areas.