calculate the number of possible number of words If one word can be at most 63 characters long. It can be combination of :


*

*letters from a to z

*numbers from 0 to 9

*hyphen - but only if not in the first or the last character of the word


I'm trying to calculate possible number of combinations for a given domain name. I took stats facts here :
https://webmasters.stackexchange.com/a/16997
I have a very poor, elementary level of math so I've got this address from a friend to ask this. If someone could write me a formula how to calculate this or give me exact number or any useful information that would be great.

Hyphens really make this question a lot more difficult, because not only can a domain name not start or end with a hyphen, but it also cannot have two or more consecutive hyphens, while it can theoretically have up to thirty non-consecutive hyphens. I'm going to ignore the hyphen issue in my answer:
Letters from a to z: 26 values
Numbers from 0 to 9: 10 values
So for every letter of the domain name, it can take one of 36 values. A domain name can have a length of [1,63]. Therefore, there are 36 different domain names of length 1, $36^2$ different domain names of length 2, ... $36^{63}$ different domain names of length 63.
So we can express the number of domain names as: 
$\sum\limits_{n=1}^{63} 36^n$
