An ideal Maxwell-Boltzmann gas confined in various rectangular nano domains is considered under quantum size effects. Thermodynamic quantities are calculated from their relations with partition function which consists of triple infinite summations over momentum states in each direction. To get analytical expressions, summations are converted to integrals for macro systems by continuum approximation which fails at nanoscales. To avoid both from the numerical calculation of summations and the failure of their integral approximations at nanoscale, a method which gives an analytical expression for single particle partition function (SPPF) is proposed. It's shown that dimensional transition in momentum space occurs at certain magnitude of confinement. Therefore, to represent SPPF by lower-dimensional analytical expressions becomes possible rather than numerical calculation of summations. Considering rectangular domains with different aspect ratios, comparison of the results of derived expressions with those of summation forms of SPPF is done. Its shown that analytical expressions for SPPF give very precise results with maximum relative errors of around 1%, 2% and 3% at just the transition point for single, double and triple transitions respectively. Based on dimensional transitions, expressions for free energy, entropy, internal energy, chemical potential, heat capacity and pressure are given analytically valid for any scale.