"What's an average cost per square foot" questions are notoriously difficult to answer without details not the least of which is where you are located. But I think here on the East Coast you should expect at least $1,500 quote for the labor component (remove old and lay new boards) and the materials can vary wildly. I imagine you'd want recycled plastic boards and vinyl railing to prevent rot and maintenance and boards can go from $6/sq. ft. to $10/sq. ft. Since they aren't sold by sq. ft. and the board length and thickness (and therefore price) depends on the joists spacing, there will be some waste, so you're probably looking at approx. $4,000 - $4,500 worth of material costs. There will also be some expenses associated with removal of the old boards, cost of fasteners and hardware and other miscellaneous costs.
In addition to reading what people say online, please do ask two or three decking contractors in the area for an estimate. There are many more questions that need to be answered and someone has to look at the structural integrity of the frame, show you a few samples of the board material and color and do other things that are impossible to do online. Good luck! Â