How to calculate value of pair but in opposite direction I am new to trading so my question might seem obvious or stupid to some but here goes.

Exchanges often quote crypto pairs in a specific order, i.e. ETH/BTC but not very often (if at all) BTC/ETH. Also XRP/BTC but not BTC/XRP.

What if someone wants to buy BTC by selling XRP or ETC. Is it possible? If yes, how is that value calculated?

e.g. looking at ETH/BTC on Binance today the value is $8,101.82. What if I want to buy BTC from ETH (i.e. BTC/ETH), how do we calculate that value given the prices an exchange gives on ETH/BTC?

Thank you.
whether an exchange offers the Pair ABC/DEF or DEF/ABC depends on the readability of the values. so most exchanges have the same pair-orders. you can see that effect at https://coinmarketcap.com/currencies/ethereum/#markets if you search for "ETH/BTC" and if you search for "BTC/ETH". but you can always trade in both directions. back to your example "What if someone wants to buy BTC by selling XRP or ETC. Is it possible?" yes. let's say you are trading on the ETH/BTC market: the statement "i buy btc" is equal to "i sell eth". (and the opposite statements would be "i buy eth" and "i sell btc" which is also possible on every ETH/BTC-market). 

"how do we calculate that value given the prices an exchange gives on ETH/BTC?" like Eliyahu pointed out the value is simply the reciprocal of the price but this value will rarely be displayed. look at BTC/USDT for example: current price is $8101. no one wants the pair USDT/BTC because the price would be 0.0001234415BTC (1/8101 BTC) which is probably very unfamiliar for the most users.