What does the sentence "If only I had a calculator in the exam" express?

What does the sentence "If only I had a calculator in the exam" express?

Explanation

Expresses regret or a wish about the past.

"If only" is used to show a strong wish for something that didn’t happen.