The opening balance on your statement is the total amount your bank has recorded for all the transactions in your account at the beginning of the statement period.
The way QuickBooks Online calculates the beginning balance for an account depends on whether the account has ever been reconciled before:
Previously-reconciled accounts: The total amount of all reconciled transactions, regardless of date
New or previously-unreconciled accounts: The account's initial balance
When your QuickBooks Online beginning balance doesn't match the bank statement's, it's called a beginning balance discrepancy.
Beginning balance discrepancy causes
The most common causes for a beginning balance discrepancy are:
The amount or account of a previously-reconciled transaction was changed
A previously-reconciled transaction was deleted
The amount or account of a transaction that was connected to a previously-reconciled transaction was deleted or changed. For example, if you reconcile your credit card statement, including last month's payment from your checking account, but, in your checking account, you accidentally delete the payment to your credit card, the next time you reconcile your credit card statement, your beginning balance will be off by the amount of the payment.
A transaction's reconciliation status was changed in the register. This can be caused either when the reconciliation status of a previously-reconciled transaction was changed from reconciled (R) to cleared (C) or neither (blank), or when the status of an unreconciled transaction was changed to reconciled (R)