If the battery is for example 3.5mm x 14mm x 20mm and is 3.7V what is it's capacity?
How accurate can such calculation be?
While you could use a "Energy density per volume" calculation, I think the safest bet would be to search for similar sized/priced/application batteries and make an estimate from there.
Since you know its 3.7V, I'll assume its Li-ion. From Wikipedia, we could say 250 to 620 W·h/L. Since your battery is roughly one milliliter, we can estimate from 0.25 to 0.62W.h, or 67mAh to 167mAh.
Now, we can double check that by looking for small Li-ion batteries on the web:
From that I'd say the wikipedia numbers are a bit optimistic, because probably it takes into consideration the whole range of batteries (from the cheap ones we are looking at to others with super high density, etc..).
Next step is a guess, if you think this battery is new, good quality, from a good manufacturer, you can be optimistic. If its old, cheap and not taken much care for, then be a bit more pessimistic.
Anyway, its not a safe method at all, but should give a ball park. Ideally you would charge it and measure with different loads to be safe.
Best approach: look up the capacity in the datasheet. If the battery doesn't have the datasheet, get a different battery that has got the datasheet.
Other approaches may be more trouble than they are worth [at least in the developed world they are]. So, I should probably stop writing now.
Empirical approach. Suppose, for the purposes of cultural enrichment, you want to go through the exercise of guessing the size of the battery. Identify the battery chemistry (probably Li-something in your case). Capacity is more a less proportional to the volume of the battery. Find batteries with the same chemistry that have known capacity. Plot the capacity [mAh] vs. volume [cm3]. Find where your battery x fits on the curve. You might be able to guess within a factor of 2x that way (you can get luckier than 2x, but not more accurate).
Experimental approach. Charge the battery. Discharge through battery analyzer (battery profiler).