In Federal cases, the Bureau of Prisons will award 54 days good time credit off of your sentence for every full year to which you were sentenced. If you are given 23 months sentence, for example, then you only have 1 full year (12 months) and will only get one 54-day reduction. Unlike state court, good time computations will begin the first day you step foot in county jail even before you are found guilty and sentenced. There may be other ways to reduce your sentence, by the way, the best known one for US citizens with two or more years sentence is the Alcohol and Drug Assistance Program (500 Hours Program) which is handled within the Correctional Institute but, on graduation, entitles the inmate to be release six months early into a halfway house.
State Court 50% Good Time
For nonviolent crimes, and some violent crimes where the judge had discretion to require 50 or 85% good time and either says nothing or awards 50% good time, then for every day the inmate serves in prison a second day is taken off of his sentence. A three year sentence would end up being one and one half years for example. The one catch is that time spent in local jail awaiting trial/plea counts as only one day off the sentence, not two. It is not completely dead time but you may not get the benefit of good time
States Cases 85%
This is a misnomer because what it means is that, because the crime was violent in nature, the inmate must serve 85% of the sentence and only 15% is reduced for good time in prison. This will apply to habitual offender time attached to a violent crime. And you can lose some good time for major infractions in prison (you did not earn good time credits for a period in which you were not considered a "good" inmate without violations).