We describe an algorithm to compute trisections of orientable four-manifolds using arbitrary triangulations as input. This results in explicit complexity bounds for the trisection genus of a 4-manifold in terms of the number of pentachora (4-simplices) in a triangulation.