How to get value of Y for a given value of X for a curve EDIT

I have this data which I have plotted against each other. Y is measuring cumulative planted area (so it goes from 0% to 100%) while X is measuring % cumulative rainfall with respect to that location's climatology. So I am interested in know how much rainfall needs to be accumulated in order to plant 50% of the area 
   y <- c(0.5,3.0,22.2,46.0,77.3,97.0,98.9,100.0)
   x <- c(0.96,10.68,17.55,32.46,41.04,47.51,60.98,80.99)

   plot(x,y, pch = 19, xlab = "X",ylab = "Y")

I am looking for a method to say know what it the value of Y for a given value of X. I am specially interested in understanding what is the value of Y for X = 50. Could you please help me how to fit a curve and in R? 
 A: How to do it in R is off-topic here, but if R is half as good as they say you should have no difficulty finding implementations. 
I'd suggest not thinking of curve fitting, but of interpolation. Here are three methods of interpolation: linear (familiar since childhood), cubic spline and piecewise cubic Hermite. The aspect ratios for the graphs exaggerate the differences, which is needed for comparison. Cubic spline in particular waggles locally but pchip respects local maxima and minima and thus is monotonic for these data. (If you have subject-specific knowledge on whether the relationship should be monotonic, do tell.) 
To do the interpolation I added a grid at $x =$ 1(1)80. 

For $x =$ 50 I get 
  +-----------------------------------+
  |    linear      spline       pchip |
  |-----------------------------------|
  | 97.351225   100.56174   97.639561 |
  +-----------------------------------+

For comparison I give here polynomial fits up to 6 

and a logistic equation 

The latter predicts 93.12383 at $x =$ 50. The polynomials show the usual sad progression from underfitting to overfitting. What extra spin the logistic may deserve from relevance to underlying process I can't say. There might be a case for taking 100 as known upper limit and leaving only two parameters to estimate. 
A: You can use a polynomial regression to do this. It looks like a 3rd or 4th degree polynomial would fit your data. Try something like:
# This fits a 3rd degree polynomial to the data
fit <- lm(y ~ poly(x, 3, raw=TRUE))
predict(fit, data.frame(x=50))

Changing the 3 will change the degree of the polynomial. You can also put any vector into data.frame(x=c(...)) to get the predicted value of any x-values. You can plot the line by doing:
plot(x, y)
xx <- seq(0, 85, length.out=100)
lines(xx, predict(xx, data.frame(x=xx)))

A: The fitting to a linear piecewise function might be sufficient to model your experiment. The figure below shows the result of fitting a three segments piecewise function to your data.

The equation of the function is : 

The computed values of the parameters $a_1 , a_2 , p_1 , q_1 , p_2 , q_2 , p_3 , q_3 $ are shown on the figure.
The method of calculus is very simple (no iteration, no initial guessed value). See pages 30 and 31 in the paper : https://fr.scribd.com/document/380941024/Regression-par-morceaux-Piecewise-Regression-pdf
If you want the value of $x$ corresponding to a given value $y$ on the second segment :
$$x=\frac{y-q_2}{p_2}$$
For example with $y=50$ we get $x=\frac{50-(-20.159)}{2.262}=31.02$ 
The logistic equation found by Nick Cox leads to $x=31.86$ which is close (difference = $0.84$).
On the other hand, at $x=50$ the piecewise function gives $y=2.262*50-20.159=92.94$
The N.Cox's logistic function gives $y=93.14$ very close again (difference = $0.20$)
On a statistical viewpoint, the logistic model might be more significant that the piecewise model. So, one could prefer the logistic model, even if the regression for fitting is more complicated than with the piecewise model.
