If the fare allows it then the online systems should price it out correctly when you book it as a multi-segment itinerary with the couple days in the stopover city. More and more of the least expensive fares are not allowing free stopovers these days, so that may be part of the problem.
With dates and cities (and carrier if there is one you are looking at specifically) someone here can probably help you find the fare rules and a better answer.