Let $S$ be a groupoid (semigroup,group) and let $R$ be a ring (not necessarily with unity) which can be expressed as a $R={\bigoplus}_{s\in S}R_{s}$ of additive subgroups $R_{s}$ of $R$ with $s\in S$. If $R_{s}R_{t}\subseteq R_{st}$ for all $s,t\in S$ then we say that $R$ is groupoid graded (semigroup-graded, group-graded) ring.

We refer to $R=\bigoplus_{s\in S}R_{s}$ as an $S$-grading of $R$ and the subgroups $R_{s}$ as the $s$-components of $R$. If we have the stronger condition that $R_{s}R_{t}=R_{st}$ for all $s,t\in S$, then we say that the ring $R$ is strongly graded by $S$.

Any element $r_{s}$ in $R_{s}$ (where $s\in S$) is said to be homogeneous of degree $s$. Each element $r\in R$ can be expressed as a unique and finite sum $r=\sum_{s\in S}r_{s}$ of homogeneous elements $r_{s}\in R_{s}$.

For any subset $G\subseteq S$ we have $R_{G}=\sum_{g\in G}R_{g}$. Similarly $r_{G}=\sum_{g\in G}r_{g}$. If $G$ is a subsemigroup of $S$ then $R_{G}$ is a subring of $R$. If $G$ is a left (right, two-sided) ideal of $S$ then $R_{G}$ is a left (right, two-sided) ideal of $R$.

Some examples of graded rings include:
Polynomial rings
Ring of symmetric functions
Generalised matrix rings
Morita contexts
Ring of Hirota derivatives
group rings
filtered algebras