As of NetSuite standard functionality, Retained Earnings will be auto calculated by the system.
Retained earnings are reported in the Trial balance report as the sum of cumulative Net Income and amounts posted directly to the retained earnings account through Journal entries.
The cumulative Net Income is a calculated reporting value which will not be recorded in the Account Register Detail report. So, the journal entries posted to the account only will be shown in the Account detail report.
The Retained earnings balance of a particular date includes all transactions posted on or before that date, plus Net Income posted on or before the end of the previous accounting period.