How mass spec formate and acetate adducts masses are calculated? If I look at any tables or calculators, I find that negative ion formate adduct has a monoisotopic mass of +44.9982 units. If I try to calculate myself, I get slightly different result:

H + C + O + O = 
1.007825 + 12.0107 + 15.9994 + 15.9994 = 
45.017325


The difference is 0.019, what is already not indifferent, as usually I calculate with a tolerance of +- 0.02 units, which means this can cause me miss many hits. I could not find out what may cause this difference.

Later had similar experiences with the acetate, as in tables +59.013851 can be found, but if I calculate:

3 x H + 2 x C + 2 X O = 
3 x 1.007825 + 2 x 12.0107 + 2 x 15.9994 =
59.043748


Which means even more, 0.0298 difference.

My question is what causes the difference, and what is the correct wat to calculate these masses?
In your calculation, you are using the average molecular mass of the structure, where atomic masses are based on the natural abundance of all isotopes of the element.

H:  1.00794 u
C: 12.01070 u
O: 15.99940 u
O: 15.99940 u
─────────────
   45.01744 u


However, for the exact molecular mass (or monoisotopic mass) of the structure, the atomic masses of each atom are based on the most common isotope for the element.

H-1:   1.00783 u
C-12: 12.00000 u
O-16: 15.99491 u
O-16: 15.99491 u
────────────────
      44.99765 u


Furthermore, you are missing the mass of the extra electron of the formate ion. The electron mass is $m_\mathrm e=0.000548579909070(16)\ \mathrm u$. Thus,

H-1:   1.00783 u
C-12: 12.00000 u
O-16: 15.99491 u
O-16: 15.99491 u
e−:    0.00055 u
────────────────
      44.99820 u