In an average garden, it's a good idea to change the location where you plant your tomatoes each year. This helps prevent soil pests and diseases from building up in any given spot. Tomatoes like rich, well-drained soil and should be mulched to help keep soil moisture constant rather than letting the soil dry out too much between waterings. Alternate wetting and drying contributes to problems such as "catface" tomatoes (tomatoes with a distorted, gnarled bottom). The black spots you refer to may be blossom-end rot. This physiological condition shows up as sunken black areas on the bottom (blossom end) of the fruit.
The problem is indeed caused by a lack of calcium in the fruit itself. There may be plenty of calcium in the soil, but it's failing to reach the fruit during critical stages of development. To prevent this problem, keep your plant watered consistently to keep it from going from very wet to very dry. Mulch the soil around the plants to maintain consistent moisture. To prevent damage to shallow roots, avoid cultivating near the plants. Sometimes in very hot conditions, you simply can't keep blossom-end rot from happening on susceptible varieties. If the black spots on your tomatoes are small and scattered over the surface of the fruit, it is likely a disease problem. If this is the case, you may need to move your tomatoes to a different site or spray with fungicide.
If moving the tomato patch is not feasible, try building a raised bed at the site. Adding fresh compost can keep soil life active enough to reduce the likelihood of disease or pests building up. If you are strapped for space, lay a bag of compost on its side, slit it open, poke holes in the underside, and plant directly in the compost-filled bag.