The federal government is stretching your tax dollars — in search of the perfect condom.

The National Institutes of Health will spend $224,863 to test 95 “custom-fitted” condoms so every American man can choose the one that fits just right.

The study was prompted by concern that despite the wide-scale promotion of latex condoms to help prevent the spread of HIV, their use remains “disappointingly low,” the government said.

Why? Because one-third to one-half of men complain of poor-fitting rubbers and are less likely to use them, the feds said.

The NIH blames US “regulatory guidelines” for American men having to choose from a “narrow range of condom sizes.”

The six-figure grant was awarded to TheyFit of Covington, Ga., which offers a wide variety of condoms that vary in length — from a bit more than 3 inches to nearly 9 ¹/₂ — and in width.

They’re available in European Union countries, but not in the United States, where they would have to be approved by the Food and Drug Administration.

“For most of their existence, condoms were custom fitted,” TheyFit explains on its Web site.

“For hundreds of years, until the early part of the 20th century, they were made of linen or animal gut fitted to over individual penis sizes.”

But the introduction of latex, mass production of condoms and other factors created what the firm calls “the ‘one size fits all’ condom.”

For the man who doesn’t know his own penis size, TheyFit offers a free downloadable “FitKit.”

The NIH wants to test that, as well.

“We also seek to improve upon traditional self-report mechanisms of penis measurement by validating the TheyFit measuring tool,” reads an outline of the project, titled “Behavioral and Manufacturing Science to Commercially Develop Fitted Condoms.”

“This would address an important research question regarding validated measures and supply information on whether users have sufficient proficiency to accurately determine their custom condom size.”

In 2009, the NIH financed a $423,500 study to find out why condom usage is so low in the United States.