To find board feet, multiply thickness in inches by width in inches by length in feet. Then divide by 12.
A 2x4 that is 8 ft long is 2 times 4 times 8, divided by 12. That is about 5.3 board feet.
Use nominal sizes for the math, not the actual dressed sizes. Lumber yards often price by the thousand board feet, written MBF.
Hardwood and heavy timber are commonly sold by the board foot. Framing lumber is often quoted by the piece. Match your takeoff unit to the quote.