A function f is said to be periodic with period m if we have
f(x+m) = f(x)   for all m>0
tan(π+x) = tanx
hence tanx is periodic with period π not 2π. 
Period means the time interval between two waves. Periodic function is a function that repeats its values at regular intervals or periods. In other words, a function which repeats its values after every particular interval, is known as a periodic function. This particular interval is termed as theperiod of that function.

A function f is said to be periodic with period m, if we have
f (x + m) = f (x), For every m > 0.

It means that the function f(x) possess same values after an interval of "m". One can say that the function f repeats all its values after every interval of "m".

For example - The sine function i.e. sin x has a period 2 π because 2 π is the smallest number for which sin (x + 2π) = sin x, for all x.

We may also calculate the period using the formula derived from the basic sine and cosine equations. The period for function y = A sin( B x - c ) and y = A cos( B x - c ) is B radians. The reciprocal of period of a function is equal to its frequency. Frequency is defined as the number of cycles completed in one second. If the period of a function is denoted by P and f be its frequency, then -
f = 1P.