With UA you can confirm an upgrade from a discounted fare at the time you purchase tickets by spending 10,000 miles (one way). So, ORD-SFO will cost you 10,000 miles. Then, SFO-ORD will be another 10,000 miles.
Of course, this is subject to availability,
which you can search for online.
Moreover, it's 10k miles domestically whether you're flying ORD-SFO, ORD-IAH, or even ORD-DTW. Not always a great value.