  We study periodicity and twisted periodicity of the trivial extension algebra
$T(A)$ of a finite-dimensional algebra $A$. We prove that (twisted) periodicity
of the trivial extension is equivalent to $A$ being (twisted) fractionally
Calabi--Yau. Moreover, twisted periodicity of $T(A)$ is equivalent to the
$d$-representation-finiteness of the $r$-fold trivial extension algebra
$T_r(A)$ for some positive integers $r$ and $d$. These results allow us to
construct a large number of new examples of periodic as well as fractionally
Calabi--Yau algebras, and give answers to several open questions.
