In this work we describe fine gradings of the simple
finite-dimensional Lie algebra d4 over an algebraically closed
field of characteristic zero. We use two independent approaches.
The first one involves some computational tools while the second
is of a more conceptual nature and is related to octonions and
triality. A common feature of both viewpoints is the use of
certain results of the theory of linear algebraic groups.