I think what you want is the semi-partial correlation squared. This gives you the proportion of variance in y accounted for by x1 having controlled for x2. Note that this isn't necessarily the same as the proportion of variance in y accounted for by x1. That is the regular correlation squared. They will differ if the variables x1 and x2 are not perfectly uncorrelated. In addition, the multiple $R^2$ will be equal to the sum of $r_{yx_2}^2$ (i.e., the zero-order correlation squared for one of your variables), plus $r_{yx_1|x_2}$ (i.e., the semi-partial correlation squared controlling for the first variable), plus $r_{yx_1|x_2x_3}$, etc.
The formula for the semi-partial correlation is:
$$
r_{yx_1|x_2} = \frac{r_{yx_1} - r_{yx_2}r_{x_1x_2}}{\sqrt{(1-r_{x_1x_2}^2)}}
$$
Here is a simple R
demonstration:
semi.r = function(y, x, given){ # this function will compute the semi-partial r
ryx = cor(y, x)
ryg = cor(y, given)
rxg = cor(x, given)
num = ryx - (ryg*rxg)
dnm = sqrt( (1-rxg^2) )
sp.r = num/dnm
return(sp.r)
}
set.seed(9503) # this makes the example exactly reproducible
x1 = rnorm(10) # these variables are uncorrelated in the population
x2 = rnorm(10) # but not perfectly uncorrelated in this sample:
cor(x1, x2) # [1] 0.1265472
y = 4 + .5*x1 - .3*x2 + rnorm(10, mean=0, sd=1)
model = lm(y~x1+x2)
summary(model)
# ...
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 4.1363 0.4127 10.022 2.11e-05 ***
# x1 0.1754 0.3800 0.461 0.658
# x2 -0.6181 0.3604 -1.715 0.130
# ...
sp.x1 = semi.r(y=y, x=x1, given=x2); sp.x1 # [1] 0.1459061
sp.x1^2 # [1] 0.02128858
c.x2 = cor(x2, y); c.x2 # [1] -0.5280958
c.x2^2 # [1] 0.2788852
c.x2^2 + sp.x1^2 # [1] 0.3001738
summary(model)$r.squared # [1] 0.3001738