A formula for alignment? You can use something like what roaminggamer posted and can read more about this topic here:
local w = display.contentWidth
local h = display.contentHeight
local fullw = display.actualContentWidth
local fullh = display.actualContentHeight
local centerX = display.contentCenterX
local centerY = display.contentCenterY
local unusedWidth = fullw - w
local unusedHeight = fullh - h
local left = centerX - fullw/2
local top = centerY - fullh/2
local right = centerX + fullw/2
local bottom = centerY + fullh/2