For a calendar year corporate tax return, the tax rate is fairly simple. For 2017, you use the old rules (15% on the first $50,000, 25% on the next $25,000, etc.) and for 2018, it is simply a flat 21%.
However, for corporations with a fiscal year-end, it is slightly more complicated. The formula is to take the number of days in 2017 and apply that rate to that share of income and then take the number of days in 2018 and apply that rate. You do not calculate separate income for 2017 and 2018.
Let's look at an example:
LMN Farm Corporation has a March 31, 2018 year-end. It earned exactly $50,000 of income. The number of days before January 1, 2018 is 275 or 75.34%. The tax on $50,000 is $7,500 times 75.34% equals $5,650.50. The tax on $50,000 in 2018 is 21% or $10,500 times 24.66% or $2,589.79. If we add these two numbers together we get $8,240 (rounded). That is the amount of tax this corporation will pay for the year ended March 31, 2018.
Most tax software should calculate this number automatically. If you are preparing a corporate return manually, this will be the formula you use.