Calculate Output