set /P s= for /f "tokens=1-12 delims=: " %%a in ("%s%") do ( echo %%l set /a z=(((%%i-%%c)*(%%j-%%a)-(%%g-%%a)*(%%l-%%c))*(%%e-%%b)+((%%g-%%a)*(%%k-%%b)-(%%h-%%b)*(%%j-%%a))*(%%f-%%c)+((%%h-%%b)*(%%l-%%c)-(%%i-%%c)*(%%k-%%b))*(%%d-%%a))/6 ) echo %z%