When do we use future perfect?

when an action is to be completed in the future. For example,

By noon I will have eaten six doughnuts.

By the time you read this post, you will have already figured it out.

The FP tense is formed by
will + have + past_participle

Never mind the distinction between "will" and "shall" for now...