You use energy no matter what you're doing, even when sleeping. You can calculate your BMR either using the BMR Calculator or the BMR Formula to determine the number of calories you would burn if you stayed in bed all day, for example.
You may have noticed that it becomes harder every year to eat whatever you want and stay slim and that your BMR decreases as you age. Depriving yourself of food in hopes of losing weight also decreases your BMR, ruining your plans. However, a regular routine of cardiovascular exercise can increase your BMR, improving your health and fitness when your body's ability to burn energy gradually slows down.
If you are interested in how BMR is calculated, this page also has the mathematical BMR
Formulas.
The BMR Formula uses the variables of height, weight, age and gender to calculate the Basal Metabolic Rate (BMR). This is more accurate than calculating caloric needs based on body weight alone. The only factor it omits is lean body mass and thus the muscle-to-fat ratio a body has. Remember, leaner bodies need more calories than less leaner ones. Therefore, this equation will be very accurate in all but very muscular (will underestimate caloric needs) and very fat (will overestimate caloric needs) bodies.
Metric BMR Formula
Women: BMR = 655 + (9.6 x weight in kilograms) + (1.8 x height in centimeters) - (4.7 x age in years)
Men: BMR = 66 + (13.7 x weight in kilograms) + (5 x height in centimeters) - (6.8 x age in years)
Once you know your BMR, you can calculate your Daily Caloric Needs, based on your activity level, using the Harries Benedict Equation.
Source: http://www.bmi-calculator.net/waist-to-hip-ratio-calculator/apple-body-shape.php