Is rental real estate equity calculated before or after tax?

And if you sold the property, the equity would no longer come into play, more capital gains from the sale, right?