To calculate the database size in oracle database use the query below. It actually checks the database size physical consume on disk.
SQL> select sum(bytes)/1024/1024/1024 size_in_GB from dba_data_files; SIZE_IN_GB ---------- 4968.95389 SQL>
And to check the total space used by the data:
SQL> select sum(bytes)/1024/1024/1024 size_in_GB from dba_segments; SIZE_IN_GB ---------- 4283.73047 SQL>
meda Edited answer 24/09/2022