The cofactor formula for computing the determinant of a matrix is applicable when elements of the matrix are from a commutative ring. However, the complexity of this method is extremely high and I believe there should be a better solution.
If it is a matrix over a PID, I believe the method of elimination like Smith normal form may be applicable. But if have a more general ring which is not a PID, are there known methods to do something similar?