If D.C. Mayor Marion Barry gets any prison or halfway house time when he is sentenced tomorrow for cocaine possession, he will be receiving the same sentence as 43 percent of all defendants recently convicted of drug possession charges in federal courts nationwide.

According to U.S. Sentencing Commission spokesman Paul Martin, of the 3,007 drug trafficking and possession cases filed in federal courts nationwide during a 15-month period from November 1987 to February 1989, only 370 were for simple drug possession. Of those, 52.2 percent got probation. A total of 43.8 percent were sentenced to time in prison, a community treatment center or both. The rest were fined. No D.C. figures were available.

But those statistics are misleading. In fact, according to the Sentencing Commission, it is so rare for a simple drug possession case to wind up in federal court that comparisons are hard to make. Most cocaine possession charges are filed in D.C. Superior Court and other crowded municipal courts.

U.S. District Judge Thomas Penfield Jackson has not indicated whether he is leaning toward sending Barry to prison. U.S. Attorney Jay B. Stephens is expected to ask Jackson to impose a prison sentence, possibly up to the maximum 12 months. Barry's lawyer, R. Kenneth Mundy, is expected to argue that the mayor, as a one-time drug offender, should not be sent to jail.

Under federal sentencing guidelines, a first offense for drug possession would get Barry a sentence of anything from probation to six months in prison. But Barry's chances of getting some kind of prison term apparently are increased by the recommendations of a pre-sentencing report given to Jackson by the U.S. Probation Office.

The probation office calls for Jackson to impose a more severe sentence because of Barry's failure to accept responsibility and because there was enough evidence that he lied to a grand jury to allow Jackson to conclude that he tried to obstruct justice, Mundy said in court Friday. It could not be learned whether the probation office made other findings that could further increase the likelihood of a prison sentence for Barry -- such as saying that the mayor abused the public trust.

If Jackson accepts the probation office's finding that Barry obstructed justice, then the judge would have to sentence Barry to at least two months in prison under the guidelines. If Jackson also finds Barry abused the public trust, the mayor would face a mandatory minimum sentence of six months.

G. Alan Dale, a local defense attorney, said that the Sentencing Commission statistics suggest that most of the federal cocaine possession charges cited involved plea bargains where the original charge was more serious.

More recent national figures are available than the commission's statistics from 1987 to 1989, but they are not useful for comparison because they include a number of crack possession cases involving amounts of more than five grams. Under a law that went into effect in November 1988, federal judges are required to imose a prison term of at least five years in those cases, artificially inflating the length of prison sentences, Martin said.

A different set of laws and sentencing rules applies in D.C. Superior Court, but Stephen E. Rickman, director of statistical analysis at the District's Office of Criminal Justice Plans and Analysis, said first-time defendants convicted of misdemeanor cocaine possession face virtually no prospect of prison time.

Rickman said he based his assessment on anecdotal evidence because "sentencing data is not kept systematically by anybody."

Even if Jackson sentences Barry to prison, it is unlikely that the mayor would be required to begin serving the sentence immediately. For one thing, Mundy could appeal. Usually, judges grant delays in imposition of sentence, pending appeal. If there is no appeal, it is still common for judges to give defendants time to put their affairs in order before reporting to prison.

Staff writers Barton Gellman and Michael York contributed to this report.