Title: On the distributions of time averaged weighted Brownian trajectories Abstract: Modern developments in microscopy and image processing are revolutionizing areas of physics, chemistry, and biology as nanoscale objects can be tracked with unprecedented accuracy. The goal of single-particle tracking is to determine the interaction between the particle and its environment. The price paid for having a direct visualization of a single particle is a consequent lack of statistics. Here we address the question of extracting diffusion constants from single trajectories of $d$-dimensional Brownian motion using the time averages of a squared trajectory, tempered by some power-law functions of time. We show that such estimators possess an ergodic property, i.e., the distribution converges to a delta-function centered at the ensemble average value of the diffusion coefficient as the observation time tends to infinity, only for certain weighting functions. We show that for a certain choice of parameters such functionals efficiently filter out the fluctuations and provide the true ensemble average diffusion coefficient with any necessary precision, but at expense of progressively higher experimental resolutions. These results are generalized for fractional Brownian motion, for which we also specify the optimal weighting functions producing an ergodic behavior, and discuss as well, the influence of disorder on the distributions of the time-averaged, weighted least-squares estimators.