How does an exchange calculate the price of a coin? I know it has to do with the amount of sell and buy orders, but what is the formula to do this?
For example, if GDAX says one bitcoin is $10k on their exchange, how did they calculate that?
It's normally all about offer and demand.
A "formula" for an exchange could be something like:
BTC price shown on the website = average amound (in $) paid for 1 BTC within the last 2 minutes [- exchange fees]
If there are 2 trades in this time: person A buys 1 BTC for 10,000$ and person B buys 1 BTC for 10,100$, the average is 10,050$. And if there are 500 trades in the last 2 minutes, you get a more accurate average price.
it's value change is analogous to other market thing as gold,silver.
if 1.people not want Bitcoin suddenly 2.or country ban the Bitcoin 3.bitcoin network get problem with some reason and many more event cause demand reduce and supply increase so Bitcoin value decrease and vise versa if demand increase the Bitcoin value increase.
The value of its decided at bitcoin exchange which depends on market (one of main reason is supply and demand).each Bitcoin exchange have own value but not far from other exchange . almost all exchange have equal value.