How to estimate needed undo retention for a operation?
There are a number of things you can do to ensure successful completion:

Optimize your query. Use DBMS_XPLAN to display your query execution plan, then work to eliminate things that could slow it down, like full table scans, by having proper indexes on join columns. See this article, this article and this article for details on getting started.

Make sure you have accurate statistics gathered on your source tables. This whitepaper from Oracle explains optimizer stats in detail.

If your CTAS query is failing because there have been too many changes to the underlying data, then consider running the command only when there are no competing workloads on the database.

If everything else fails, look at changing Undo settings using the retention guarantee and the Undo Advisor as described here.