To calculate Donchian channels, identify the highest high and the lowest low within the set number of periods. The top band is the highest high, the bottom band is the lowest low, and the middle band is the average of the two. Adjust the period to suit your trading approach.