m calc script