It can also be calculated based on your lean muscle mass but then you have to get properly measured. There are a lot of different ways to get your lean muscle mass figure but the most accurate, and the only truly reliable way IMO, is with a hydrostatic weighing. If you live near a major University you can usually get this done through the Phys Ed or Exercise Physiology Departments.
Once you know your lean muscle mass you can figure out your caloric needs per day using a formula. An exercise phys lab woulod be able to help you with that as well. Although, as suggested by Darcy, I'm sure there's a calculator on the net that will work.
Living life like there's no tomorrow.
http://gorgebikefitter.com/
2007 Look Dura Ace
2010 Custom Tonic cross with discs, SRAM
2012 Moots YBB 2 x 10 Shimano XTR
2014 Soma B-Side SS