How are the penalties/fines along with interest is calculated for the overdue amount from prior year returns? Need to know for both federal and state of california.

How are the penalties/fines along with interest is calculated for the overdue amount from prior year returns? Need to know for both federal and state of california.