  New and more reliable distances and proper motions of a large number of stars
in the Tycho-Gaia Astrometric Solution (TGAS) catalogue allow to calculate the
local matter density distribution more precisely than earlier. We devised a
method to calculate the stationary gravitational potential distribution
perpendicular to the Galactic plane by comparing the vertical probability
density distribution of a sample of observed stars with the theoretical
probability density distribution computed from their vertical coordinates and
velocities. We applied the model to idealised test stars and to the real
observational samples. Tests with two mock datasets proved that the method is
viable and provides reasonable results. Applying the method to TGAS data we
derived that the total matter density in the Solar neighbourhood is $0.09\pm
0.02 \text{M}_\odot\text{pc}^{-3}$ being consistent with the results from
literature. The matter surface density within $|z|\le 0.75 \text{kpc}$ is
$42\pm 4 \text{M}_\odot\text{pc}^{-2}$. This is slightly less than the results
derived by other authors but within errors is consistent with previous
estimates. Our results show no firm evidence for significant amount of dark
matter in the Solar neighbourhood. However, we caution that our calculations at
$|z| \leq 0.75$ kpc rely on an extrapolation from the velocity distribution
function calculated at $|z| \leq 25$ pc. This extrapolation can be very
sensitive to our assumption that the stellar motions are perfectly decoupled in
R and z, and to our assumption of equilibrium. Indeed, we find that $\rho (z)$
within $|z|\le 0.75$ kpc is asymmetric with respect to the Galactic plane at
distances $|z| = 0.1-0.4$ kpc indicating that the density distribution may be
influenced by density perturbations.
