A basic question about supply and demand graph i have some basic knowledge on economics ,and i had an argument with a friend ,so  my question is this , as we all know 
(If we ignore all the outside factors) that the price of any product is governed by it's quantity in the market. So the more from that product existing in the market the lower the prices and vise versa. 
Is there a method or formula that works backwards i mean from the price of that product you can find the quantity that represented in the market ??

Update: 
I saw a gold graph once and the price was changing according to time not the quantity. And people start to draw as they call it trend lines (upward and downward ) so if the trend is up they call it Supply if the trend is down it is a demand graph, is this right ? Is there  a way to find the quantity of gold that traded in this example from the graph it self ? Of course we still ignoring the other factors that could change market direction we talk only supply and demand.
Maybe it is a silly question .... sorry.
Yes, typically we would like estimate these curves’ functional forms. If we estimate a demand function $P=10-2Q$ we can rearrange it such that $Q=5-\frac{1}{2}P$. 

This, just changes the way we interpret the relationship. For a given quantity how does price change? Compared to, for a given price how does quantity change? This begs even further questions however because in the market we typically just observe equilibriums and “shocks” that determine prices typically also affect quantity. This makes estimating these functional forms difficult from an econometrics point of view.