Pull a calculation out of its loop.