Declaring and defining variable calculation