I have a galaxy s5 that is in nearly perfect condition. I had this phone through At&T. Last September, we switched to Sprint and our contract through AT&T was paid off. After I master reset and take my sim card out, am I able to sell this phone?
As long as you're not attached to a contract with Sprint for that phone, I don't see why not. Sprint might even take it for a trade in, if you're interested. You also might want to find a way to unlock the phone if it isn't already unlocked if you plan to sell it online or on something like Craigslist.
You can sell the phone but if it's not unlocked, only AT&T users would be able to use it. However, if your phone is payed off, you can request AT&T to unlock it if it's not currently so; that way any SIM cards from compatible carriers/networks can be used.