State tax filing

Thanks, that was very helpful. One more question though, how does SC calculate capital gains on a home sale? For example, does it consider the cost-basis of the bought and sold homes, or simply the difference between the bought and sold price? If the former, how do I indicate I overpaid the capital gains tax to SC?