Enter your bed or area size and how deep you want the topsoil, and get the cubic yards, cubic feet and number of bags to buy — plus the cost.
Topsoil is measured by volume, so you need three numbers: the length and width of the area in feet, and how deep you want the soil in inches. Multiply length by width to get the square footage, multiply that by the depth in feet (inches ÷ 12), and you have cubic feet. There are 27 cubic feet in a cubic yard, which is how bulk topsoil is sold.
A 40 lb bag of topsoil holds about 0.75 cubic feet, which varies with moisture. Since there are 27 cubic feet in a cubic yard, it takes about 36 of those bags to make one cubic yard (27 ÷ 0.75 = 36). Bags are handy for small jobs; once you get past a cubic yard or so, bulk topsoil by the cubic yard is almost always cheaper and less to haul.
For new beds, 4 to 6 inches gives roots room to establish. To topdress a lawn, spread only about a quarter inch at a time so you don't smother the grass. For raised beds, fill to a few inches below the rim to leave room for mulch and watering.
This is a planning aid. A 40 lb bag of topsoil holds about 0.75 cubic feet, which varies with moisture — coverage figures are rounded rules of thumb. Always round up and buy a little extra.